Method and device for encoding/decoding image, and recording medium having stored bitstream

ABSTRACT

The present invention relates to an image encoding/decoding method. The image decoding method includes splitting a coding tree unit (CTU) into at least one coding unit (CU) according to a block splitting structure and performing CU-based decoding, in which the block partition structure is configured such that at least one of binary tree splitting and ternary tree splitting is performed after quadtree splitting is performed.

CROSS-RELATED TO RELATED APPLICATIONS

This application is a Divisional application of U.S. patent applicationSer. No. 16/648,470, filed on Mar. 18, 2020, which is a U.S. NationalStage Application of International Application No. PCT/KR2018/011139,filed on Sep. 20, 2018, which claims the benefit under 35 USC 119(a) and365(b) of Korean Patent Application No. 10-2017-0121006, filed on Sep.20, 2017, and Korean Patent Application No. 10-2018-0071825, filed onJun. 22, 2018 in the Korean Intellectual Property Office, the entiredisclosure of which is incorporated herein by reference for allpurposes.

TECHNICAL FIELD

The present invention relates to an image encoding/decoding method, animage encoding/decoding apparatus, and a recording medium in which abitstream is stored. In particular, the present invention relates to animage encoding/decoding method and apparatus using various blocksplitting structures.

BACKGROUND ART

Recently, demands for high-resolution and high-quality images such ashigh definition (HD) images and ultra high definition (UHD) images, haveincreased in various application fields. However, higher resolution andquality image data has increasing amounts of data in comparison withconventional image data. Therefore, when transmitting image data byusing a medium such as conventional wired and wireless broadbandnetworks, or when storing image data by using a conventional storagemedium, costs of transmitting and storing increase. In order to solvethese problems occurring with an increase in resolution and quality ofimage data, high-efficiency image encoding/decoding techniques arerequired for higher-resolution and higher-quality images.

Image compression technology includes various techniques, including: aninter-prediction technique of predicting a pixel value included in acurrent picture from a previous or subsequent picture of the currentpicture; an intra-prediction technique of predicting a pixel valueincluded in a current picture by using pixel information in the currentpicture; a transform and quantization technique for compressing energyof a residual signal; an entropy encoding technique of assigning a shortcode to a value with a high appearance frequency and assigning a longcode to a value with a low appearance frequency; etc. Image data may beeffectively compressed by using such image compression technology, andmay be transmitted or stored.

Meanwhile, in the image encoding/decoding, a Coding Unit (CU) may beused for splitting the image efficiently. the Coding Unit may be used asa basic unit of image encoding/decoding.

In a conventional image encoding/decoding method and apparatus, a codingunit has a square shape and is split in a quadtree form at all times.Therefore, there is a limitation in encoding or decoding an image toadapt to various local content characteristics.

DISCLOSURE Technical Problem

Accordingly, the present invention has been made keeping in mind theabove problems occurring in the prior art, and an object of the presentinvention is to provide a method and apparatus for encoding/decoding animage using various block splitting structures to improve imageencoding/decoding efficiency.

Technical Solution

A method of decoding an image according to the present invention, themethod may comprise splitting a coding tree unit (CTU) into at least onecoding unit (CU) according to a block splitting structure; andperforming CU-based decoding, wherein the block splitting structure isconfigured such that at least one of binary tree splitting and ternarytree splitting is performed after quadtree splitting is performed.

In the method of decoding an image according to the present invention,wherein the CU-based decoding is achieved by performing either or bothof intra prediction and inter prediction on a per coding unit basis.

In the method of decoding an image according to the present invention,wherein the CU-based decoding is achieved by performing at least one ofinverse transform and dequantization on a per coding unit basis.

In the method of decoding an image according to the present invention,wherein the binary trees include a vertical binary tree and a horizontalbinary tree, and the ternary trees include a vertical ternary tree and ahorizontal ternary tree.

In the method of decoding an image according to the present invention,wherein the block splitting structure is determined on the basis of atleast one of a first flag indicating whether or not quadtree splittingneeds to be performed, a second flag indicating whether or notbinary/ternary tree splitting needs to be performed, a third flagindicating either a vertical split or a horizontal split, and a fourthflag indicating either the binary tree splitting or the ternary treesplitting.

In the method of decoding an image according to the present invention,wherein the block splitting structure is determined on the basis of atleast one of a quadtree root node size, a minimal allowed quadtree leafnode size, a maximal allowed binary tree root node size, a maximalallowed ternary tree root node size, a maximal allowed binary/ternarytree depth, a minimal allowed binary tree leaf node size, and a minimalallowed ternary tree lead node size.

In the method of decoding an image according to the present invention,wherein at least one of the quadtree root node size, the minimal allowedquadtree leaf node size, the maximal allowed binary tree root node size,a maximal allowed ternary tree root node size, the maximal allowedbinary/ternary tree depth, the minimal allowed binary tree leaf nodesize, and the minimal allowed ternary tree lead node size is included ina sequence parameter set (SPS).

In the method of decoding an image according to the present invention,wherein the block splitting structure is determined on the basis of amaximal allowed transform size.

In the method of decoding an image according to the present invention,wherein when the coding tree unit is included in an intra slice, theblock splitting structure of a luma signal of the coding tree unit andthe block splitting structure of a chroma signal of the coding tree unitare independently determined of each other.

A method of encoding an image according to the present invention, themethod may comprise splitting a coding tree unit (CTU) into at least onecoding unit (CU) according to a block splitting structure; andperforming CU-based encoding, wherein the block splitting structure isconfigured such that quadtree splitting is performed first and at leastone of binary tree splitting and ternary tree splitting is thenperformed.

In the method of encoding an image according to the present invention,wherein the CU-based encoding is achieved by performing either or bothof intra prediction and inter prediction on a per coding unit basis.

In the method of encoding an image according to the present invention,wherein the CU-based encoding is achieved by performing at least one ofinverse transform and dequantization on a per coding unit basis.

In the method of encoding an image according to the present invention,wherein the block splitting structure is limited on the basis of atleast one of a quadtree root node size, a minimal allowed quadtree leafnode size, a maximal allowed binary tree root node size, a maximalallowed ternary tree root node size, a maximal allowed binary/ternarytree depth, a minimal allowed binary tree leaf node size, and a minimalallowed ternary tree lead node size.

In the method of encoding an image according to the present invention,wherein at least one of the quadtree root node size, the minimal allowedquadtree leaf node size, the maximal allowed binary tree root node size,a maximal allowed ternary tree root node size, the maximal allowedbinary/ternary tree depth, the minimal allowed binary tree leaf nodesize, and the minimal allowed ternary tree lead node size is included ina sequence parameter set (SPS).

In the method of encoding an image according to the present invention,wherein the block splitting structure is determined on the basis of amaximal allowed transform size.

In the method of encoding an image according to the present invention,wherein when the coding tree unit is included in an intra slice, theblock splitting structure of a luma signal of the coding tree unit andthe block splitting structure of a chroma signal of the coding tree unitare independently determined of each other.

A computer readable recording medium storing a program, wherein an imageencoding method is executed as below when the program is executed by aprocessor: splitting a coding tree unit (CTU) into at least one codingunit (CU) according to a block splitting structure; and performingCU-based encoding, wherein the block splitting structure is configuredsuch that quadtree splitting is performed first and then at least one ofbinary tree splitting and ternary tree splitting is performed.

Advantageous Effects

The present invention can provide a method and apparatus forencoding/decoding an image using various block splitting structures inorder to improve image encoding/decoding efficiency.

According to the present invention, image encoding/decoding efficiencycan be improved.

According to the present invention, the computational complexity of animage encoder and an image decoder can be reduced.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing configurations of an encodingapparatus according to an embodiment of the present invention;

FIG. 2 is a block diagram showing configurations of a decoding apparatusaccording to an embodiment of the present invention;

FIG. 3 is a view schematically showing a partition structure of an imagewhen encoding and decoding the image;

FIG. 4 is a diagram illustrating quadtree splitting, symmetric binarytree (SBT) splitting, and asymmetric binary tree (ABT) splittingaccording to embodiments of the present invention;

FIG. 5 illustrates an example of a quadtree plus symmetric binary treesplitting structure;

FIG. 6 is a diagram illustrating a coding tree unit (CTU) that is firstsplit by a quadtree splitting and then by a symmetric binary treesplitting, and a corresponding tree structure;

FIG. 7 illustrates examples of a quadtree plus asymmetric binary treesplitting structure;

FIG. 8 is a diagram illustrating recursive execution of an asymmetricbinary tree splitting in a quadtree plus asymmetric binary treesplitting structure according to an embodiment of the present invention;

FIG. 9 is a diagram illustrating signaling of a quadtree plus asymmetricbinary tree splitting;

FIG. 10 illustrates examples of a quadtree plus shifted binary treesplitting structure in which splitting by the powers of 2 is possible;

FIG. 11 illustrates examples of a quadtree plus shifted binary treesplitting structure in which splitting by the powers of 2 is notpossible;

FIG. 12 is diagram illustrating signaling of a quadtree plus shiftedbinary tree splitting structure;

FIG. 13 illustrates a combined quadtree and binary tree splittingstructure according to an embodiment of the present invention;

FIGS. 14A, 14B, 14C, 14D and 14E illustrate a quadtree plusbinary/ternary tree splitting structure according to an embodiment ofthe present invention;

FIGS. 15A, 15B, 15C and 15D illustrate vertical binary tree splitting(BI_VER_SPLIT), horizontal binary tree splitting (BI_HOL_SPLIT),vertical ternary tree splitting (TRI_VER_SPLIT), and horizontal ternarytree splitting (TRI_HOL_SPLIT) for each block type, according toembodiments of the present invention;

FIG. 16 is a diagram illustrating splitting modes available in thequadtree plus binary/ternary tree splitting structure;

FIGS. 17A, FIG. 17B, FIG. 17C and FIG. 17D are diagrams illustrating bitallocation in each available splitting mode according to an embodimentof the present invention;

FIG. 18 is a diagram illustrating signaling of a quadtree plusbinary/ternary tree splitting structure;

FIG. 19 is a diagram illustrating signaling of information onsplit-to-square splitting;

FIG. 20 is a diagram illustrating separated PU/TU tree splittingstructures according to an embodiment of the present invention;

FIG. 21 is a diagram illustrating an example of a CTU that is splitfirst by a quadtree splitting and then by a binary tree splitting ateach quadtree depth and each binary tree depth;

FIG. 22 is a diagram illustrating an example in which a chroma signal Cband a chroma signal Cr in a CTU are split differently by a quadtree plusbinary tree splitting;

FIGS. 23A, 23B, 23C, 23D, 23E, and 23F are diagrams illustratingexemplary scanning methods for scanning reconstructed quantizationmatrix coefficients;

FIG. 24 is a flowchart illustrating an image decoding method accordingto an embodiment of the present invention; and

FIG. 25 is a flowchart illustrating an image encoding method accordingto an embodiment of the present invention.

BEST MODE Mode for Invention

A variety of modifications may be made to the present invention andthere are various embodiments of the present invention, examples ofwhich will now be provided with reference to drawings and described indetail. However, the present invention is not limited thereto, althoughthe exemplary embodiments can be construed as including allmodifications, equivalents, or substitutes in a technical concept and atechnical scope of the present invention. The similar reference numeralsrefer to the same or similar functions in various aspects. In thedrawings, the shapes and dimensions of elements may be exaggerated forclarity. In the following detailed description of the present invention,references are made to the accompanying drawings that show, by way ofillustration, specific embodiments in which the invention may bepracticed. These embodiments are described in sufficient detail toenable those skilled in the art to implement the present disclosure. Itshould be understood that various embodiments of the present disclosure,although different, are not necessarily mutually exclusive. For example,specific features, structures, and characteristics described herein, inconnection with one embodiment, may be implemented within otherembodiments without departing from the spirit and scope of the presentdisclosure. In addition, it should be understood that the location orarrangement of individual elements within each disclosed embodiment maybe modified without departing from the spirit and scope of the presentdisclosure. The following detailed description is, therefore, not to betaken in a limiting sense, and the scope of the present disclosure isdefined only by the appended claims, appropriately interpreted, alongwith the full range of equivalents to what the claims claim.

Terms used in the specification, ‘first’, ‘second’, etc. can be used todescribe various components, but the components are not to be construedas being limited to the terms. The terms are only used to differentiateone component from other components. For example, the ‘first’ componentmay be named the ‘second’ component without departing from the scope ofthe present invention, and the ‘second’ component may also be similarlynamed the ‘first’ component. The term ‘and/or’ includes a combination ofa plurality of items or any one of a plurality of terms.

It will be understood that when an element is simply referred to asbeing ‘connected to’ or ‘coupled to’ another element without being‘directly connected to’ or ‘directly coupled to’ another element in thepresent description, it may be ‘directly connected to’ or ‘directlycoupled to’ another element or be connected to or coupled to anotherelement, having the other element intervening therebetween. In contrast,it should be understood that when an element is referred to as being“directly coupled” or “directly connected” to another element, there areno intervening elements present.

Furthermore, constitutional parts shown in the embodiments of thepresent invention are independently shown so as to representcharacteristic functions different from each other. Thus, it does notmean that each constitutional part is constituted in a constitutionalunit of separated hardware or software. In other words, eachconstitutional part includes each of enumerated constitutional parts forconvenience. Thus, at least two constitutional parts of eachconstitutional part may be combined to form one constitutional part orone constitutional part may be divided into a plurality ofconstitutional parts to perform each function. The embodiment where eachconstitutional part is combined and the embodiment where oneconstitutional part is divided are also included in the scope of thepresent invention, if not departing from the essence of the presentinvention.

The terms used in the present specification are merely used to describeparticular embodiments, and are not intended to limit the presentinvention. An expression used in the singular encompasses the expressionof the plural, unless it has a clearly different meaning in the context.In the present specification, it is to be understood that terms such as“including”, “having”, etc. are intended to indicate the existence ofthe features, numbers, steps, actions, elements, parts, or combinationsthereof disclosed in the specification, and are not intended to precludethe possibility that one or more other features, numbers, steps,actions, elements, parts, or combinations thereof may exist or may beadded. In other words, when a specific element is referred to as being“included”, elements other than the corresponding element are notexcluded, but additional elements may be included in embodiments of thepresent invention or the scope of the present invention.

In addition, some of constituents may not be indispensable constituentsperforming essential functions of the present invention but be selectiveconstituents improving only performance thereof. The present inventionmay be implemented by including only the indispensable constitutionalparts for implementing the essence of the present invention except theconstituents used in improving performance. The structure including onlythe indispensable constituents except the selective constituents used inimproving only performance is also included in the scope of the presentinvention.

Hereinafter, embodiments of the present invention will be described indetail with reference to the accompanying drawings. In describingexemplary embodiments of the present invention, well-known functions orconstructions will not be described in detail since they mayunnecessarily obscure the understanding of the present invention. Thesame constituent elements in the drawings are denoted by the samereference numerals, and a repeated description of the same elements willbe omitted.

Hereinafter, an image may mean a picture configuring a video, or maymean the video itself. For example, “encoding or decoding or both of animage” may mean “encoding or decoding or both of a moving picture”, andmay mean “encoding or decoding or both of one image among images of amoving picture.”

Hereinafter, terms “moving picture” and “video” may be used as the samemeaning and be replaced with each other.

Hereinafter, a target image may be an encoding target image which is atarget of encoding and/or a decoding target image which is a target ofdecoding. Also, a target image may be an input image inputted to anencoding apparatus, and an input image inputted to a decoding apparatus.Here, a target image may have the same meaning with the current image.

Hereinafter, terms “image”, “picture, “frame” and “screen” may be usedas the same meaning and be replaced with each other.

Hereinafter, a target block may be an encoding target block which is atarget of encoding and/or a decoding target block which is a target ofdecoding. Also, a target block may be the current block which is atarget of current encoding and/or decoding. For example, terms “targetblock” and “current block” may be used as the same meaning and bereplaced with each other.

Hereinafter, terms “block” and “unit” may be used as the same meaningand be replaced with each other. Or a “block” may represent a specificunit.

Hereinafter, terms “region” and “segment” may be replaced with eachother.

Hereinafter, a specific signal may be a signal representing a specificblock. For example, an original signal may be a signal representing atarget block. A prediction signal may be a signal representing aprediction block. A residual signal may be a signal representing aresidual block.

In embodiments, each of specific information, data, flag, index, elementand attribute, etc. may have a value. A value of information, data,flag, index, element and attribute equal to “0” may represent a logicalfalse or the first predefined value. In other words, a value “0”, afalse, a logical false and the first predefined value may be replacedwith each other. A value of information, data, flag, index, element andattribute equal to “1” may represent a logical true or the secondpredefined value. In other words, a value “1”, a true, a logical trueand the second predefined value may be replaced with each other.

When a variable i or j is used for representing a column, a row or anindex, a value of i may be an integer equal to or greater than 0, orequal to or greater than 1. That is, the column, the row, the index,etc. may be counted from 0 or may be counted from 1.

Description of Terms

Encoder: means an apparatus performing encoding. That is, means anencoding apparatus.

Decoder: means an apparatus performing decoding. That is, means andecoding apparatus.

Block: is an M×N array of a sample. Herein, M and N may mean positiveintegers, and the block may mean a sample array of a two-dimensionalform. The block may refer to a unit.

A current block my mean an encoding target block that becomes a targetwhen encoding, or a decoding target block that becomes a target whendecoding. In addition, the current block may be at least one of anencode block, a prediction block, a residual block, and a transformblock.

Sample: is a basic unit constituting a block. It may be expressed as avalue from 0 to 2^(Bd)−1 according to a bit depth (B_(d)). In thepresent invention, the sample may be used as a meaning of a pixel. Thatis, a sample, a pel, a pixel may have the same meaning with each other.

Unit: may refer to an encoding and decoding unit. When encoding anddecoding an image, the unit may be a region generated by partitioning asingle image. In addition, the unit may mean a subdivided unit when asingle image is partitioned into subdivided units during encoding ordecoding. That is, an image may be partitioned into a plurality ofunits. When encoding and decoding an image, a predetermined process foreach unit may be performed. A single unit may be partitioned intosub-units that have sizes smaller than the size of the unit. Dependingon functions, the unit may mean a block, a macroblock, a coding treeunit, a code tree block, a coding unit, a coding block), a predictionunit, a prediction block, a residual unit), a residual block, atransform unit, a transform block, etc. In addition, in order todistinguish a unit from a block, the unit may include a luma componentblock, a chroma component block associated with the luma componentblock, and a syntax element of each color component block. The unit mayhave various sizes and forms, and particularly, the form of the unit maybe a two-dimensional geometrical figure such as a square shape, arectangular shape, a trapezoid shape, a triangular shape, a pentagonalshape, etc. In addition, unit information may include at least one of aunit type indicating the coding unit, the prediction unit, the transformunit, etc., and a unit size, a unit depth, a sequence of encoding anddecoding of a unit, etc.

Coding Tree Unit: is configured with a single coding tree block of aluma component Y, and two coding tree blocks related to chromacomponents Cb and Cr. In addition, it may mean that including the blocksand a syntax element of each block. Each coding tree unit may bepartitioned by using at least one of a quad-tree partitioning method, abinary-tree partitioning method and ternary-tree partitioning method toconfigure a lower unit such as coding unit, prediction unit, transformunit, etc. It may be used as a term for designating a sample block thatbecomes a process unit when encoding/decoding an image as an inputimage. Here, the quad-tree may mean a quaternary-tree.

Coding Tree Block: may be used as a term for designating any one of a Ycoding tree block, Cb coding tree block, and Cr coding tree block.

Neighbor Block: may mean a block adjacent to a current block. The blockadjacent to the current block may mean a block that comes into contactwith a boundary of the current block, or a block positioned within apredetermined distance from the current block. The neighbor block maymean a block adjacent to a vertex of the current block. Herein, theblock adjacent to the vertex of the current block may mean a blockvertically adjacent to a neighbor block that is horizontally adjacent tothe current block, or a block horizontally adjacent to a neighbor blockthat is vertically adjacent to the current block.

Reconstructed Neighbor block: may mean a neighbor block adjacent to acurrent block and which has been already spatially/temporally encoded ordecoded. Herein, the reconstructed neighbor block may mean areconstructed neighbor unit. A reconstructed spatial neighbor block maybe a block within a current picture and which has been alreadyreconstructed through encoding or decoding or both. A reconstructedtemporal neighbor block is a block at a corresponding position as thecurrent block of the current picture within a reference image, or aneighbor block thereof.

Unit Depth: may mean a partitioned degree of a unit. In a treestructure, the highest node (Root Node) may correspond to the first unitwhich is not partitioned. Also, the highest node may have the leastdepth value. In this case, the highest node may have a depth of level 0.A node having a depth of level 1 may represent a unit generated bypartitioning once the first unit. A node having a depth of level 2 mayrepresent a unit generated by partitioning twice the first unit. A nodehaving a depth of level n may represent a unit generated by partitioningn-times the first unit. A Leaf Node may be the lowest node and a nodewhich cannot be partitioned further. A depth of a Leaf Node may be themaximum level. For example, a predefined value of the maximum level maybe 3. A depth of a root node may be the lowest and a depth of a leafnode may be the deepest. In addition, when a unit is expressed as a treestructure, a level in which a unit is present may mean a unit depth.

Bitstream: may mean a bitstream including encoding image information.

Parameter Set: corresponds to header information among a configurationwithin a bitstream. At least one of a video parameter set, a sequenceparameter set, a picture parameter set, and an adaptation parameter setmay be included in a parameter set. In addition, a parameter set mayinclude a slice header, and tile header information.

Parsing: may mean determination of a value of a syntax element byperforming entropy decoding, or may mean the entropy decoding itself.

Symbol: may mean at least one of a syntax element, a coding parameter,and a transform coefficient value of an encoding/decoding target unit.In addition, the symbol may mean an entropy encoding target or anentropy decoding result.

Prediction Mode: may be information indicating a mode encoded/decodedwith intra prediction or a mode encoded/decoded with inter prediction.

Prediction Unit: may mean a basic unit when performing prediction suchas inter-prediction, intra-prediction, inter-compensation,intra-compensation, and motion compensation.

A single prediction unit may be partitioned into a plurality ofpartitions having a smaller size, or may be partitioned into a pluralityof lower prediction units. A plurality of partitions may be a basic unitin performing prediction or compensation. A partition which is generatedby dividing a prediction unit may also be a prediction unit.

Prediction Unit Partition: may mean a form obtained by partitioning aprediction unit.

Reference Picture List: may refer to a list including one or morereference pictures used for inter prediction or motion compensation.There are several types of usable reference picture lists, including LC(List combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3).

Inter prediction indicator: may refer to a direction of inter prediction(unidirectional prediction, bidirectional prediction, etc.) of a currentblock. Alternatively, it may refer to the number of reference picturesused to generate a prediction block of a current block. Alternatively,it may refer to the number of prediction blocks used at the time ofperforming inter prediction or motion compensation on a current block.

Prediction list utilization flag: indicates whether a prediction blockis generated using at least one reference picture in a specificreference picture list. An inter prediction indicator can be derivedusing a prediction list utilization flag, and conversely, a predictionlist utilization flag can be derived using an inter predictionindicator. For example, when the prediction list utilization flag has afirst value of zero (0), it means that a reference picture in areference picture list is not used to generate a prediction block. Onthe other hand, when the prediction list utilization flag has a secondvalue of one (1), it means that a reference picture list is used togenerate a prediction block.

Reference picture index: may refer to an index indicating a specificreference picture in a reference picture list.

Reference picture: may mean a reference picture which is referred to bya specific block for the purposes of inter prediction or motioncompensation of the specific block. Alternatively, the reference picturemay be a picture including a reference block referred to by a currentblock for inter prediction or motion compensation. Hereinafter, theterms “reference picture” and “reference image” have the same meaningand can be interchangeably.

Motion vector: may be a two-dimensional vector used for inter predictionor motion compensation. The motion vector may mean an offset between anencoding/decoding target block and a reference block. For example, (mvX,mvY) may represent a motion vector. Here, mvX may represent a horizontalcomponent and mvY may represent a vertical component.

Search range: may be a two-dimensional region which is searched toretrieve a motion vector during inter prediction. For example, the sizeof the search range may be M×N. Here, M and N are both integers.

Motion vector candidate: may refer to a prediction candidate block or amotion vector of the prediction candidate block when predicting a motionvector. In addition, a motion vector candidate may be included in amotion vector candidate list.

Motion vector candidate list: may mean a list composed of one or moremotion vector candidates.

Motion vector candidate index: may mean an indicator indicating a motionvector candidate in a motion vector candidate list. Alternatively, itmay be an index of a motion vector predictor.

Motion information: may mean information including at least one of theitems including a motion vector, a reference picture index, an interprediction indicator, a prediction list utilization flag, referencepicture list information, a reference picture, a motion vectorcandidate, a motion vector candidate index, a merge candidate, and amerge index.

Merge candidate list: may mean a list composed of one or more mergecandidates.

Merge candidate: may mean a spatial merge candidate, a temporal mergecandidate, a combined merge candidate, a combined bi-predictive mergecandidate, or a zero merge candidate. The merge candidate may includemotion information such as an inter prediction indicator, a referencepicture index for each list, a motion vector, a prediction listutilization flag, and an inter prediction indicator.

Merge index: may mean an indicator indicating a merge candidate in amerge candidate list. Alternatively, the merge index may indicate ablock from which a merge candidate has been derived, among reconstructedblocks spatially/temporally adjacent to a current block.

Alternatively, the merge index may indicate at least one piece of motioninformation of a merge candidate.

Transform Unit: may mean a basic unit when performing encoding/decodingsuch as transform, inverse-transform, quantization, dequantization,transform coefficient encoding/decoding of a residual signal. A singletransform unit may be partitioned into a plurality of lower-leveltransform units having a smaller size. Here,transformation/inverse-transformation may comprise at least one amongthe first transformation/the first inverse-transformation and the secondtransformation/the second inverse-transformation.

Scaling: may mean a process of multiplying a quantized level by afactor. A transform coefficient may be generated by scaling a quantizedlevel. The scaling also may be referred to as dequantization.

Quantization Parameter: may mean a value used when generating aquantized level using a transform coefficient during quantization. Thequantization parameter also may mean a value used when generating atransform coefficient by scaling a quantized level duringdequantization. The quantization parameter may be a value mapped on aquantization step size.

Delta Quantization Parameter: may mean a difference value between apredicted quantization parameter and a quantization parameter of anencoding/decoding target unit.

Scan: may mean a method of sequencing coefficients within a unit, ablock or a matrix. For example, changing a two-dimensional matrix ofcoefficients into a one-dimensional matrix may be referred to asscanning, and changing a one-dimensional matrix of coefficients into atwo-dimensional matrix may be referred to as scanning or inversescanning.

Transform Coefficient: may mean a coefficient value generated aftertransform is performed in an encoder. It may mean a coefficient valuegenerated after at least one of entropy decoding and dequantization isperformed in a decoder. A quantized level obtained by quantizing atransform coefficient or a residual signal, or a quantized transformcoefficient level also may fall within the meaning of the transformcoefficient.

Quantized Level: may mean a value generated by quantizing a transformcoefficient or a residual signal in an encoder. Alternatively, thequantized level may mean a value that is a dequantization target toundergo dequantization in a decoder. Similarly, a quantized transformcoefficient level that is a result of transform and quantization alsomay fall within the meaning of the quantized level.

Non-zero Transform Coefficient: may mean a transform coefficient havinga value other than zero, or a transform coefficient level or a quantizedlevel having a value other than zero.

Quantization Matrix: may mean a matrix used in a quantization process ora dequantization process performed to improve subjective or objectiveimage quality. The quantization matrix also may be referred to as ascaling list.

Quantization Matrix Coefficient: may mean each element within aquantization matrix. The quantization matrix coefficient also may bereferred to as a matrix coefficient.

Default Matrix: may mean a predetermined quantization matrixpreliminarily defined in an encoder or a decoder.

Non-default Matrix: may mean a quantization matrix that is notpreliminarily defined in an encoder or a decoder but is signaled by auser.

Statistic Value: a statistic value for at least one among a variable, anencoding parameter, a constant value, etc. which have a computablespecific value may be one or more among an average value, a weightedaverage value, a weighted sum value, the minimum value, the maximumvalue, the most frequent value, a median value, an interpolated value ofthe corresponding specific values.

FIG. 1 is a block diagram showing a configuration of an encodingapparatus according to an embodiment to which the present invention isapplied.

An encoding apparatus 100 may be an encoder, a video encoding apparatus,or an image encoding apparatus. A video may include at least one image.The encoding apparatus 100 may sequentially encode at least one image.

Referring to FIG. 1 , the encoding apparatus 100 may include a motionprediction unit 111, a motion compensation unit 112, an intra-predictionunit 120, a switch 115, a subtractor 125, a transform unit 130, aquantization unit 140, an entropy encoding unit 150, a dequantizationunit 160, a inverse-transform unit 170, an adder 175, a filter unit 180,and a reference picture buffer 190.

The encoding apparatus 100 may perform encoding of an input image byusing an intra mode or an inter mode or both. In addition, encodingapparatus 100 may generate a bitstream including encoded informationthrough encoding the input image, and output the generated bitstream.The generated bitstream may be stored in a computer readable recordingmedium, or may be streamed through a wired/wireless transmission medium.When an intra mode is used as a prediction mode, the switch 115 may beswitched to an intra. Alternatively, when an inter mode is used as aprediction mode, the switch 115 may be switched to an inter mode.Herein, the intra mode may mean an intra-prediction mode, and the intermode may mean an inter-prediction mode. The encoding apparatus 100 maygenerate a prediction block for an input block of the input image. Inaddition, the encoding apparatus 100 may encode a residual block using aresidual of the input block and the prediction block after theprediction block being generated. The input image may be called as acurrent image that is a current encoding target. The input block may becalled as a current block that is current encoding target, or as anencoding target block.

When a prediction mode is an intra mode, the intra-prediction unit 120may use a sample of a block that has been already encoded/decoded and isadjacent to a current block as a reference sample. The intra-predictionunit 120 may perform spatial prediction for the current block by using areference sample, or generate prediction samples of an input block byperforming spatial prediction. Herein, the intra prediction may meanintra-prediction,

When a prediction mode is an inter mode, the motion prediction unit 111may retrieve a region that best matches with an input block from areference image when performing motion prediction, and deduce a motionvector by using the retrieved region. In this case, a search region maybe used as the region. The reference image may be stored in thereference picture buffer 190. Here, when encoding/decoding for thereference image is performed, it may be stored in the reference picturebuffer 190.

The motion compensation unit 112 may generate a prediction block byperforming motion compensation for the current block using a motionvector. Herein, inter-prediction may mean inter-prediction or motioncompensation.

When the value of the motion vector is not an integer, the motionprediction unit 111 and the motion compensation unit 112 may generatethe prediction block by applying an interpolation filter to a partialregion of the reference picture. In order to perform inter-pictureprediction or motion compensation on a coding unit, it may be determinedthat which mode among a skip mode, a merge mode, an advanced motionvector prediction (AMVP) mode, and a current picture referring mode isused for motion prediction and motion compensation of a prediction unitincluded in the corresponding coding unit. Then, inter-pictureprediction or motion compensation may be differently performed dependingon the determined mode.

The subtractor 125 may generate a residual block by using a residual ofan input block and a prediction block. The residual block may be calledas a residual signal. The residual signal may mean a difference betweenan original signal and a prediction signal. In addition, the residualsignal may be a signal generated by transforming or quantizing, ortransforming and quantizing a difference between the original signal andthe prediction signal. The residual block may be a residual signal of ablock unit.

The transform unit 130 may generate a transform coefficient byperforming transform of a residual block, and output the generatedtransform coefficient. Herein, the transform coefficient may be acoefficient value generated by performing transform of the residualblock. When a transform skip mode is applied, the transform unit 130 mayskip transform of the residual block.

A quantized level may be generated by applying quantization to thetransform coefficient or to the residual signal. Hereinafter, thequantized level may be also called as a transform coefficient inembodiments.

The quantization unit 140 may generate a quantized level by quantizingthe transform coefficient or the residual signal according to aparameter, and output the generated quantized level. Herein, thequantization unit 140 may quantize the transform coefficient by using aquantization matrix.

The entropy encoding unit 150 may generate a bitstream by performingentropy encoding according to a probability distribution on valuescalculated by the quantization unit 140 or on coding parameter valuescalculated when performing encoding, and output the generated bitstream.The entropy encoding unit 150 may perform entropy encoding of sampleinformation of an image and information for decoding an image. Forexample, the information for decoding the image may include a syntaxelement.

When entropy encoding is applied, symbols are represented so that asmaller number of bits are assigned to a symbol having a high chance ofbeing generated and a larger number of bits are assigned to a symbolhaving a low chance of being generated, and thus, the size of bit streamfor symbols to be encoded may be decreased. The entropy encoding unit150 may use an encoding method for entropy encoding such as exponentialGolomb, context-adaptive variable length coding (CAVLC),context-adaptive binary arithmetic coding (CABAC), etc. For example, theentropy encoding unit 150 may perform entropy encoding by using avariable length coding/code (VLC) table. In addition, the entropyencoding unit 150 may deduce a binarization method of a target symboland a probability model of a target symbol/bin, and perform arithmeticcoding by using the deduced binarization method, and a context model.

In order to encode a transform coefficient level (quantized level), theentropy encoding unit 150 may change a two-dimensional block formcoefficient into a one-dimensional vector form by using a transformcoefficient scanning method.

A coding parameter may include information (flag, index, etc.) such assyntax element that is encoded in an encoder and signaled to a decoder,and information derived when performing encoding or decoding. The codingparameter may mean information required when encoding or decoding animage. For example, at least one value or a combination form of aunit/block size, a unit/block depth, unit/block partition information,unit/block shape, unit/block partition structure, whether to partitionof a quad-tree form, whether to partition of a binary-tree form, apartition direction of a binary-tree form (horizontal direction orvertical direction), a partition form of a binary-tree form (symmetricpartition or asymmetric partition), whether or not a current coding unitis partitioned by ternary tree partitioning, direction (horizontal orvertical direction) of the ternary tree partitioning, type (symmetric orasymmetric type) of the ternary tree partitioning, whether a currentcoding unit is partitioned by multi-type tree partitioning, direction(horizontal or vertical direction) of the multi-type three partitioning,type (symmetric or asymmetric type) of the multi-type tree partitioning,and a tree (binary tree or ternary tree) structure of the multi-typetree partitioning, a prediction mode (intra prediction or interprediction), a luma intra-prediction mode/direction, a chromaintra-prediction mode/direction, intra partition information, interpartition information, a coding block partition flag, a prediction blockpartition flag, a transform block partition flag, a reference samplefiltering method, a reference sample filter tab, a reference samplefilter coefficient, a prediction block filtering method, a predictionblock filter tap, a prediction block filter coefficient, a predictionblock boundary filtering method, a prediction block boundary filter tab,a prediction block boundary filter coefficient, an intra-predictionmode, an inter-prediction mode, motion information, a motion vector, amotion vector difference, a reference picture index, a inter-predictionangle, an inter-prediction indicator, a prediction list utilizationflag, a reference picture list, a reference picture, a motion vectorpredictor index, a motion vector predictor candidate, a motion vectorcandidate list, whether to use a merge mode, a merge index, a mergecandidate, a merge candidate list, whether to use a skip mode, aninterpolation filter type, an interpolation filter tab, an interpolationfilter coefficient, a motion vector size, a presentation accuracy of amotion vector, a transform type, a transform size, information ofwhether or not a primary (first) transform is used, information ofwhether or not a secondary transform is used, a primary transform index,a secondary transform index, information of whether or not a residualsignal is present, a coded block pattern, a coded block flag (CBF), aquantization parameter, a quantization parameter residue, a quantizationmatrix, whether to apply an intra loop filter, an intra loop filtercoefficient, an intra loop filter tab, an intra loop filter shape/form,whether to apply a deblocking filter, a deblocking filter coefficient, adeblocking filter tab, a deblocking filter strength, a deblocking filtershape/form, whether to apply an adaptive sample offset, an adaptivesample offset value, an adaptive sample offset category, an adaptivesample offset type, whether to apply an adaptive loop filter, anadaptive loop filter coefficient, an adaptive loop filter tab, anadaptive loop filter shape/form, a binarization/inverse-binarizationmethod, a context model determining method, a context model updatingmethod, whether to perform a regular mode, whether to perform a bypassmode, a context bin, a bypass bin, a significant coefficient flag, alast significant coefficient flag, a coded flag for a unit of acoefficient group, a position of the last significant coefficient, aflag for whether a value of a coefficient is larger than 1, a flag forwhether a value of a coefficient is larger than 2, a flag for whether avalue of a coefficient is larger than 3, information on a remainingcoefficient value, a sign information, a reconstructed luma sample, areconstructed chroma sample, a residual luma sample, a residual chromasample, a luma transform coefficient, a chroma transform coefficient, aquantized luma level, a quantized chroma level, a transform coefficientlevel scanning method, a size of a motion vector search area at adecoder side, a shape of a motion vector search area at a decoder side,a number of time of a motion vector search at a decoder side,information on a CTU size, information on a minimum block size,information on a maximum block size, information on a maximum blockdepth, information on a minimum block depth, an imagedisplaying/outputting sequence, slice identification information, aslice type, slice partition information, tile identificationinformation, a tile type, tile partition information, a picture type, abit depth of an input sample, a bit depth of a reconstruction sample, abit depth of a residual sample, a bit depth of a transform coefficient,a bit depth of a quantized level, and information on a luma signal orinformation on a chroma signal may be included in the coding parameter.

Herein, signaling the flag or index may mean that a corresponding flagor index is entropy encoded and included in a bitstream by an encoder,and may mean that the corresponding flag or index is entropy decodedfrom a bitstream by a decoder.

When the encoding apparatus 100 performs encoding throughinter-prediction, an encoded current image may be used as a referenceimage for another image that is processed afterwards. Accordingly, theencoding apparatus 100 may reconstruct or decode the encoded currentimage, or store the reconstructed or decoded image as a reference imagein reference picture buffer 190.

A quantized level may be dequantized in the dequantization unit 160, ormay be inverse-transformed in the inverse-transform unit 170. Adequantized or inverse-transformed coefficient or both may be added witha prediction block by the adder 175. By adding the dequantized orinverse-transformed coefficient or both with the prediction block, areconstructed block may be generated. Herein, the dequantized orinverse-transformed coefficient or both may mean a coefficient on whichat least one of dequantization and inverse-transform is performed, andmay mean a reconstructed residual block.

A reconstructed block may pass through the filter unit 180. The filterunit 180 may apply at least one of a deblocking filter, a sampleadaptive offset (SAO), and an adaptive loop filter (ALF) to areconstructed sample, a reconstructed block or a reconstructed image.The filter unit 180 may be called as an in-loop filter.

The deblocking filter may remove block distortion generated inboundaries between blocks. In order to determine whether or not to applya deblocking filter, whether or not to apply a deblocking filter to acurrent block may be determined based samples included in several rowsor columns which are included in the block. When a deblocking filter isapplied to a block, another filter may be applied according to arequired deblocking filtering strength.

In order to compensate an encoding error, a proper offset value may beadded to a sample value by using a sample adaptive offset. The sampleadaptive offset may correct an offset of a deblocked image from anoriginal image by a sample unit. A method of partitioning samples of animage into a predetermined number of regions, determining a region towhich an offset is applied, and applying the offset to the determinedregion, or a method of applying an offset in consideration of edgeinformation on each sample may be used.

The adaptive loop filter may perform filtering based on a comparisonresult of the filtered reconstructed image and the original image.Samples included in an image may be partitioned into predeterminedgroups, a filter to be applied to each group may be determined, anddifferential filtering may be performed for each group. Information ofwhether or not to apply the ALF may be signaled by coding units (CUs),and a form and coefficient of the ALF to be applied to each block mayvary.

The reconstructed block or the reconstructed image having passed throughthe filter unit 180 may be stored in the reference picture buffer 190. Areconstructed block processed by the filter unit 180 may be a part of areference image. That is, a reference image is a reconstructed imagecomposed of reconstructed blocks processed by the filter unit 180. Thestored reference image may be used later in inter prediction or motioncompensation.

FIG. 2 is a block diagram showing a configuration of a decodingapparatus according to an embodiment and to which the present inventionis applied.

A decoding apparatus 200 may a decoder, a video decoding apparatus, oran image decoding apparatus.

Referring to FIG. 2 , the decoding apparatus 200 may include an entropydecoding unit 210, a dequantization unit 220, a inverse-transform unit230, an intra-prediction unit 240, a motion compensation unit 250, anadder 225, a filter unit 260, and a reference picture buffer 270.

The decoding apparatus 200 may receive a bitstream output from theencoding apparatus 100. The decoding apparatus 200 may receive abitstream stored in a computer readable recording medium, or may receivea bitstream that is streamed through a wired/wireless transmissionmedium. The decoding apparatus 200 may decode the bitstream by using anintra mode or an inter mode. In addition, the decoding apparatus 200 maygenerate a reconstructed image generated through decoding or a decodedimage, and output the reconstructed image or decoded image.

When a prediction mode used when decoding is an intra mode, a switch maybe switched to an intra. Alternatively, when a prediction mode used whendecoding is an inter mode, a switch may be switched to an inter mode.

The decoding apparatus 200 may obtain a reconstructed residual block bydecoding the input bitstream, and generate a prediction block. When thereconstructed residual block and the prediction block are obtained, thedecoding apparatus 200 may generate a reconstructed block that becomes adecoding target by adding the reconstructed residual block with theprediction block. The decoding target block may be called a currentblock.

The entropy decoding unit 210 may generate symbols by entropy decodingthe bitstream according to a probability distribution. The generatedsymbols may include a symbol of a quantized level form. Herein, anentropy decoding method may be a inverse-process of the entropy encodingmethod described above.

In order to decode a transform coefficient level (quantized level), theentropy decoding unit 210 may change a one-directional vector formcoefficient into a two-dimensional block form by using a transformcoefficient scanning method.

A quantized level may be dequantized in the dequantization unit 220, orinverse-transformed in the inverse-transform unit 230. The quantizedlevel may be a result of dequantizing or inverse-transforming or both,and may be generated as a reconstructed residual block. Herein, thedequantization unit 220 may apply a quantization matrix to the quantizedlevel.

When an intra mode is used, the intra-prediction unit 240 may generate aprediction block by performing, for the current block, spatialprediction that uses a sample value of a block adjacent to a decodingtarget block and which has been already decoded.

When an inter mode is used, the motion compensation unit 250 maygenerate a prediction block by performing, for the current block, motioncompensation that uses a motion vector and a reference image stored inthe reference picture buffer 270.

The adder 225 may generate a reconstructed block by adding thereconstructed residual block with the prediction block. The filter unit260 may apply at least one of a deblocking filter, a sample adaptiveoffset, and an adaptive loop filter to the reconstructed block orreconstructed image. The filter unit 260 may output the reconstructedimage. The reconstructed block or reconstructed image may be stored inthe reference picture buffer 270 and used when performinginter-prediction. A reconstructed block processed by the filter unit 260may be a part of a reference image. That is, a reference image is areconstructed image composed of reconstructed blocks processed by thefilter unit 260. The stored reference image may be used later in interprediction or motion compensation.

FIG. 3 is a view schematically showing a partition structure of an imagewhen encoding and decoding the image. FIG. 3 schematically shows anexample of partitioning a single unit into a plurality of lower units.

In order to efficiently partition an image, when encoding and decoding,a coding unit (CU) may be used. The coding unit may be used as a basicunit when encoding/decoding the image. In addition, the coding unit maybe used as a unit for distinguishing an intra prediction mode and aninter prediction mode when encoding/decoding the image. The coding unitmay be a basic unit used for prediction, transform, quantization,inverse-transform, dequantization, or an encoding/decoding process of atransform coefficient.

Referring to FIG. 3 , an image 300 is sequentially partitioned in alargest coding unit (LCU), and a LCU unit is determined as a partitionstructure. Herein, the LCU may be used in the same meaning as a codingtree unit (CTU). A unit partitioning may mean partitioning a blockassociated with to the unit. In block partition information, informationof a unit depth may be included. Depth information may represent anumber of times or a degree or both in which a unit is partitioned. Asingle unit may be partitioned into a plurality of lower level unitshierarchically associated with depth information based on a treestructure. In other words, a unit and a lower level unit generated bypartitioning the unit may correspond to a node and a child node of thenode, respectively. Each of partitioned lower unit may have depthinformation. Depth information may be information representing a size ofa CU, and may be stored in each CU. Unit depth represents times and/ordegrees related to partitioning a unit. Therefore, partitioninginformation of a lower-level unit may comprise information on a size ofthe lower-level unit.

A partition structure may mean a distribution of a coding unit (CU)within an LCU 310. Such a distribution may be determined according towhether or not to partition a single CU into a plurality (positiveinteger equal to or greater than 2 including 2, 4, 8, 16, etc.) of CUs.A horizontal size and a vertical size of the CU generated bypartitioning may respectively be half of a horizontal size and avertical size of the CU before partitioning, or may respectively havesizes smaller than a horizontal size and a vertical size beforepartitioning according to a number of times of partitioning. The CU maybe recursively partitioned into a plurality of CUs. By the recursivepartitioning, at least one among a height and a width of a CU afterpartitioning may decrease comparing with at least one among a height anda width of a CU before partitioning. Partitioning of the CU may berecursively performed until to a predefined depth or predefined size.For example, a depth of an LCU may be 0, and a depth of a smallestcoding unit (SCU) may be a predefined maximum depth. Herein, the LCU maybe a coding unit having a maximum coding unit size, and the SCU may be acoding unit having a minimum coding unit size as described above.Partitioning is started from the LCU 310, a CU depth increases by 1 as ahorizontal size or a vertical size or both of the CU decreases bypartitioning. For example, for each depth, a CU which is not partitionedmay have a size of 2N×2N. Also, in case of a CU which is partitioned, aCU with a size of 2N×2N may be partitioned into four CUs with a size ofN×N. A size of N may decrease to half as a depth increase by 1.

In addition, information whether or not the CU is partitioned may berepresented by using partition information of the CU. The partitioninformation may be 1-bit information. All CUs, except for a SCU, mayinclude partition information. For example, when a value of partitioninformation is 1, the CU may not be partitioned, when a value ofpartition information is 2, the CU may be partitioned.

Referring to FIG. 3 , an LCU having a depth 0 may be a 64×64 block. 0may be a minimum depth. A SCU having a depth 3 may be an 8×8 block. 3may be a maximum depth. A CU of a 32×32 block and a 16×16 block may berespectively represented as a depth 1 and a depth 2.

For example, when a single coding unit is partitioned into four codingunits, a horizontal size and a vertical size of the four partitionedcoding units may be a half size of a horizontal and vertical size of theCU before being partitioned. In one embodiment, when a coding unithaving a 32×32 size is partitioned into four coding units, each of thefour partitioned coding units may have a 16×16 size. When a singlecoding unit is partitioned into four coding units, it may be called thatthe coding unit may be partitioned into a quad-tree form.

For example, when one coding unit is partitioned into two sub-codingunits, the horizontal or vertical size (width or height) of each of thetwo sub-coding units may be half the horizontal or vertical size of theoriginal coding unit. For example, when a coding unit having a size of32×32 is vertically partitioned into two sub-coding units, each of thetwo sub-coding units may have a size of 16×32. For example, when acoding unit having a size of 8×32 is horizontally partitioned into twosub-coding units, each of the two sub-coding units may have a size of8×16. When one coding unit is partitioned into two sub-coding units, itcan be said that the coding unit is binary-partitioned or is partitionedby a binary tree partition structure.

For example, when one coding unit is partitioned into three sub-codingunits, the horizontal or vertical size of the coding unit can bepartitioned with a ratio of 1:2:1, thereby producing three sub-codingunits whose horizontal or vertical sizes are in a ratio of 1:2:1. Forexample, when a coding unit having a size of 16×32 is horizontallypartitioned into three sub-coding units, the three sub-coding units mayhave sizes of 16×8, 16×16, and 16×8 respectively, in the order from theuppermost to the lowermost sub-coding unit. For example, when a codingunit having a size of 32×32 is vertically split into three sub-codingunits, the three sub-coding units may have sizes of 8×32, 16×32, and8×32, respectively in the order from the left to the right sub-codingunit. When one coding unit is partitioned into three sub-coding units,it can be said that the coding unit is ternary-partitioned orpartitioned by a ternary tree partition structure.

In FIG. 3 , a coding tree unit (CTU) 320 is an example of a CTU to whicha quad tree partition structure, a binary tree partition structure, anda ternary tree partition structure are all applied.

As described above, in order to partition the CTU, at least one of aquad tree partition structure, a binary tree partition structure, and aternary tree partition structure may be applied. Various tree partitionstructures may be sequentially applied to the CTU, according to apredetermined priority order. For example, the quad tree partitionstructure may be preferentially applied to the CTU. A coding unit thatcannot be partitioned any longer using a quad tree partition structuremay correspond to a leaf node of a quad tree. A coding unitcorresponding to a leaf node of a quad tree may serve as a root node ofa binary and/or ternary tree partition structure. That is, a coding unitcorresponding to a leaf node of a quad tree may be further partitionedby a binary tree partition structure or a ternary tree partitionstructure, or may not be further partitioned. Therefore, by preventing acoding block that results from binary tree partitioning or ternary treepartitioning of a coding unit corresponding to a leaf node of a quadtree from undergoing further quad tree partitioning, block partitioningand/or signaling of partition information can be effectively performed.

The fact that a coding unit corresponding to a node of a quad tree ispartitioned may be signaled using quad partition information. The quadpartition information having a first value (e.g., “1”) may indicate thata current coding unit is partitioned by the quad tree partitionstructure. The quad partition information having a second value (e.g.,“0”) may indicate that a current coding unit is not partitioned by thequad tree partition structure. The quad partition information may be aflag having a predetermined length (e.g., one bit).

There may not be a priority between the binary tree partitioning and theternary tree partitioning. That is, a coding unit corresponding to aleaf node of a quad tree may further undergo arbitrary partitioningamong the binary tree partitioning and the ternary tree partitioning. Inaddition, a coding unit generated through the binary tree partitioningor the ternary tree partitioning may undergo a further binary treepartitioning or a further ternary tree partitioning, or may not befurther partitioned.

A tree structure in which there is no priority among the binary treepartitioning and the ternary tree partitioning is referred to as amulti-type tree structure. A coding unit corresponding to a leaf node ofa quad tree may serve as a root node of a multi-type tree. Whether topartition a coding unit which corresponds to a node of a multi-type treemay be signaled using at least one of multi-type tree partitionindication information, partition direction information, and partitiontree information. For partitioning of a coding unit corresponding to anode of a multi-type tree, the multi-type tree partition indicationinformation, the partition direction, and the partition tree informationmay be sequentially signaled.

The multi-type tree partition indication information having a firstvalue (e.g., “1”) may indicate that a current coding unit is to undergoa multi-type tree partitioning. The multi-type tree partition indicationinformation having a second value (e.g., “0”) may indicate that acurrent coding unit is not to undergo a multi-type tree partitioning.

When a coding unit corresponding to a node of a multi-type tree isfurther partitioned by a multi-type tree partition structure, the codingunit may include partition direction information. The partitiondirection information may indicate in which direction a current codingunit is to be partitioned for the multi-type tree partitioning. Thepartition direction information having a first value (e.g., “1”) mayindicate that a current coding unit is to be vertically partitioned. Thepartition direction information having a second value (e.g., “0”) mayindicate that a current coding unit is to be horizontally partitioned.

When a coding unit corresponding to a node of a multi-type tree isfurther partitioned by a multi-type tree partition structure, thecurrent coding unit may include partition tree information. Thepartition tree information may indicate a tree partition structure whichis to be used for partitioning of a node of a multi-type tree. Thepartition tree information having a first value (e.g., “1”) may indicatethat a current coding unit is to be partitioned by a binary treepartition structure. The partition tree information having a secondvalue (e.g., “0”) may indicate that a current coding unit is to bepartitioned by a ternary tree partition structure.

The partition indication information, the partition tree information,and the partition direction information may each be a flag having apredetermined length (e.g., one bit).

At least any one of the quadtree partition indication information, themulti-type tree partition indication information, the partitiondirection information, and the partition tree information may be entropyencoded/decoded. For the entropy-encoding/decoding of those types ofinformation, information on a neighboring coding unit adjacent to thecurrent coding unit may be used. For example, there is a highprobability that the partition type (the partitioned or non-partitioned,the partition tree, and/or the partition direction) of a leftneighboring coding unit and/or an upper neighboring coding unit of acurrent coding unit is similar to that of the current coding unit.Therefore, context information for entropy encoding/decoding of theinformation on the current coding unit may be derived from theinformation on the neighboring coding units. The information on theneighboring coding units may include at least any one of quad partitioninformation, multi-type tree partition indication information, partitiondirection information, and partition tree information.

As another example, among binary tree partitioning and ternary treepartitioning, binary tree partitioning may be preferentially performed.That is, a current coding unit may primarily undergo binary treepartitioning, and then a coding unit corresponding to a leaf node of abinary tree may be set as a root node for ternary tree partitioning. Inthis case, neither quad tree partitioning nor binary tree partitioningmay not be performed on the coding unit corresponding to a node of aternary tree.

A coding unit that cannot be partitioned by a quad tree partitionstructure, a binary tree partition structure, and/or a ternary treepartition structure becomes a basic unit for coding, prediction and/ortransformation. That is, the coding unit cannot be further partitionedfor prediction and/or transformation. Therefore, the partition structureinformation and the partition information used for partitioning a codingunit into prediction units and/or transformation units may not bepresent in a bit stream.

However, when the size of a coding unit (i.e., a basic unit forpartitioning) is larger than the size of a maximum transformation block,the coding unit may be recursively partitioned until the size of thecoding unit is reduced to be equal to or smaller than the size of themaximum transformation block. For example, when the size of a codingunit is 64×64 and when the size of a maximum transformation block is32×32, the coding unit may be partitioned into four 32×32 blocks fortransformation. For example, when the size of a coding unit is 32×64 andthe size of a maximum transformation block is 32×32, the coding unit maybe partitioned into two 32×32 blocks for the transformation. In thiscase, the partitioning of the coding unit for transformation is notsignaled separately, and may be determined through comparison betweenthe horizontal or vertical size of the coding unit and the horizontal orvertical size of the maximum transformation block. For example, when thehorizontal size (width) of the coding unit is larger than the horizontalsize (width) of the maximum transformation block, the coding unit may bevertically bisected. For example, when the vertical size (length) of thecoding unit is larger than the vertical size (length) of the maximumtransformation block, the coding unit may be horizontally bisected.

Information of the maximum and/or minimum size of the coding unit andinformation of the maximum and/or minimum size of the transformationblock may be signaled or determined at an upper level of the codingunit. The upper level may be, for example, a sequence level, a picturelevel, a slice level, or the like. For example, the minimum size of thecoding unit may be determined to be 4×4. For example, the maximum sizeof the transformation block may be determined to be 64×64. For example,the minimum size of the transformation block may be determined to be4×4.

Information of the minimum size (quad tree minimum size) of a codingunit corresponding to a leaf node of a quad tree and/or information ofthe maximum depth (the maximum tree depth of a multi-type tree) from aroot node to a leaf node of the multi-type tree may be signaled ordetermined at an upper level of the coding unit. For example, the upperlevel may be a sequence level, a picture level, a slice level, or thelike. Information of the minimum size of a quad tree and/or informationof the maximum depth of a multi-type tree may be signaled or determinedfor each of an intra-picture slice and an inter-picture slice.

Difference information between the size of a CTU and the maximum size ofa transformation block may be signaled or determined at an upper levelof the coding unit. For example, the upper level may be a sequencelevel, a picture level, a slice level, or the like. Information of themaximum size of the coding units corresponding to the respective nodesof a binary tree (hereinafter, referred to as a maximum size of a binarytree) may be determined based on the size of the coding tree unit andthe difference information. The maximum size of the coding unitscorresponding to the respective nodes of a ternary tree (hereinafter,referred to as a maximum size of a ternary tree) may vary depending onthe type of slice. For example, for an intra-picture slice, the maximumsize of a ternary tree may be 32×32. For example, for an inter-pictureslice, the maximum size of a ternary tree may be 128×128. For example,the minimum size of the coding units corresponding to the respectivenodes of a binary tree (hereinafter, referred to as a minimum size of abinary tree) and/or the minimum size of the coding units correspondingto the respective nodes of a ternary tree (hereinafter, referred to as aminimum size of a ternary tree) may be set as the minimum size of acoding block.

As another example, the maximum size of a binary tree and/or the maximumsize of a ternary tree may be signaled or determined at the slice level.Alternatively, the minimum size of the binary tree and/or the minimumsize of the ternary tree may be signaled or determined at the slicelevel.

Depending on size and depth information of the above-described variousblocks, quad partition information, multi-type tree partition indicationinformation, partition tree information and/or partition directioninformation may be included or may not be included in a bit stream.

For example, when the size of the coding unit is not larger than theminimum size of a quad tree, the coding unit does not contain quadpartition information. Thus, the quad partition information may bededuced from a second value.

For example, when the sizes (horizontal and vertical sizes) of a codingunit corresponding to a node of a multi-type tree are larger than themaximum sizes (horizontal and vertical sizes) of a binary tree and/orthe maximum sizes (horizontal and vertical sizes) of a ternary tree, thecoding unit may not be binary-partitioned or ternary-partitioned.Accordingly, the multi-type tree partition indication information maynot be signaled but may be deduced from a second value.

Alternatively, when the sizes (horizontal and vertical sizes) of acoding unit corresponding to a node of a multi-type tree are the same asthe maximum sizes (horizontal and vertical sizes) of a binary treeand/or are two times as large as the maximum sizes (horizontal andvertical sizes) of a ternary tree, the coding unit may not be furtherbinary-partitioned or ternary-partitioned. Accordingly, the multi-typetree partition indication information may not be signaled but be derivedfrom a second value. This is because when a coding unit is partitionedby a binary tree partition structure and/or a ternary tree partitionstructure, a coding unit smaller than the minimum size of a binary treeand/or the minimum size of a ternary tree is generated.

Alternatively, when the depth of a coding unit corresponding to a nodeof a multi-type tree is equal to the maximum depth of the multi-typetree, the coding unit may not be further binary-partitioned and/orternary-partitioned. Accordingly, the multi-type tree partitionindication information may not be signaled but may be deduced from asecond value.

Alternatively, only when at least one of vertical direction binary treepartitioning, horizontal direction binary tree partitioning, verticaldirection ternary tree partitioning, and horizontal direction ternarytree partitioning is possible for a coding unit corresponding to a nodeof a multi-type tree, the multi-type tree partition indicationinformation may be signaled. Otherwise, the coding unit may not bebinary-partitioned and/or ternary-partitioned. Accordingly, themulti-type tree partition indication information may not be signaled butmay be deduced from a second value.

Alternatively, only when both of the vertical direction binary treepartitioning and the horizontal direction binary tree partitioning orboth of the vertical direction ternary tree partitioning and thehorizontal direction ternary tree partitioning are possible for a codingunit corresponding to a node of a multi-type tree, the partitiondirection information may be signaled. Otherwise, the partitiondirection information may not be signaled but may be derived from avalue indicating possible partitioning directions.

Alternatively, only when both of the vertical direction binary treepartitioning and the vertical direction ternary tree partitioning orboth of the horizontal direction binary tree partitioning and thehorizontal direction ternary tree partitioning are possible for a codingtree corresponding to a node of a multi-type tree, the partition treeinformation may be signaled. Otherwise, the partition tree informationmay not be signaled but be deduced from a value indicating a possiblepartitioning tree structure.

The quadtree splitting, the binary tree splitting, the ternary treesplitting, and the combined tree splitting have been described withreference to FIG. 3 . Herein after, referring to FIG. 4 through 23 ,image partitioning structures according to other various embodimentswill be described.

FIG. 4 is a diagram illustrating quadtree splitting, symmetric binarytree (SBT) splitting, and asymmetric binary tree (ABT) splittingaccording to embodiments of the present invention. In FIG. 4 , wrepresents a horizontal size (width) of a block and h represents avertical size (height) of the block.

Referring to FIG. 4 , the quadtree splitting refers a split type inwhich one block is split into four sub-blocks wherein the horizontalsize and the vertical size of each of the sub-blocks resulting from thesplitting is half the horizontal size and the vertical size of theoriginal block, respectively.

The binary tree splitting refers to a split type in which one block issplit into two sub-blocks. There are two types of binary tree splitting:symmetric and asymmetric. For the symmetric binary tree splitting, thereare two types: horizontal and vertical. For the asymmetric binary treesplitting, there are also two types: horizontal and vertical. On theother hand, a binary tree leaf node refers to a coding unit (CU).

Nodes generated by a symmetric binary tree splitting have equal sizes.On the other hand, nodes generated by an asymmetric binary treesplitting have different sizes.

In FIG. 4 , as examples of asymmetric binary tree splitting, 1:3,3:1,1:7, and 7:1 horizontal and vertical asymmetric binary treesplitting structures are shown.

QuadTree Plus BinaryTree (QT+BT) Splitting

One embodiment of the present invention provides a quadtree plus binarytree splitting structure. The quadtree plus binary tree splittingstructure refers to a partitioning structure in which a block firstundergoes a quadtree splitting and then undergoes a binary treesplitting.

For example, in the quadtree plus binary tree splitting structure, acoding tree unit (CTU) is first split by a quadtree splitting, and theneach of the quadtree leaf nodes is further split by a binary treesplitting. Here, the binary tree leaf node or the quadtree leaf node isa coding unit (CU).

In the quadtree plus binary tree splitting structure, the binary treesplitting refers to only a symmetric binary tree splitting (i.e., asymmetric binary tree splitting after a quadtree splitting), or acombination of a symmetric binary tree splitting and an asymmetricbinary tree splitting (i.e., an asymmetric binary tree splitting after aquadtree splitting).

For the symmetric binary tree splitting after the quadtree splitting(hereinafter, referred to as the quadtree plus binary tree splitting),either or both of a first flag and a first index are signaled: the firstflag indicating whether a quadtree splitting needs to be performed; thefirst index indicating a horizontal symmetric split, a verticalsymmetric split, or no further split. The first flag may have a firstvalue indicating that a quadtree splitting needs to be performed or asecond value indicating that no further splitting needs to be performed.The first index may have a first value indicating no further splittingneeds to be performed, a second value indicating that a horizontalsymmetric splitting needs to be performed, or a third value indicatingthat a vertical symmetric splitting needs to be performed. The firstindex is signaled only when the first flag has the second value.Further, when it is determined that a CU cannot be further split on thebasis of the size and/or depth of the CU, the first flag and/or thefirst index is not signaled.

For another example, for the quadtree plus symmetric binary treesplitting structure, at least one of a first flag, a second flag, and athird flag is signaled: the first flag indicating whether a quadtreesplitting needs to be performed; the second flag indicating whether abinary tree splitting needs to be performed; and the third flagindicating a horizontal symmetric split or a vertical symmetric split.The first flag may have a first value indicating that a quadtreesplitting needs to be performed or a second value indicating that nofurther splitting needs to be performed. The second flag may have afirst value indicating that a binary tree splitting needs to beperformed or a second value indicating that no further splitting needsto be performed. The third flag may have a first value indicating that ahorizontal symmetric splitting needs to be performed or a second valueindicating that a vertical symmetric splitting needs to be performed.The second flag is signaled only when the first flag has the secondvalue. The third flag is signaled only when the second flag has thefirst value. Further, when it is determined that a CU cannot be furthersplit on the basis of the size and/or depth of the CU, the first flag,the second flag, and/or the third flag is not signaled.

FIG. 5 illustrates an example of the quadtree plus symmetric binary treesplitting structure. In FIG. 5 , a QT split flag indicates whether aquadtree splitting needs to be performed, a BT split flag indicateswhether a binary tree splitting needs to be performed, and a BT splittype indicates a horizontal split (a width direction split) or avertical split (a height direction split).

FIG. 6 is a diagram illustrating a coding tree unit (CTU) that is splitfirst by a quadtree splitting and then by a symmetric binary treesplitting, and a corresponding tree structure. In FIG. 6 , solid linesrepresent partitions generated by a quadtree splitting, and dotted linesrepresent partitions generated by a binary tree splitting.

When a binary tree splitting is performed, a flag indicating ahorizontal symmetric split or a vertical symmetric split is signaled. Inthe tree structure of FIG. 6 , 0 represents a horizontal symmetric splitand 1 represents a vertical symmetric split.

FIG. 7 illustrates the quadtree plus asymmetric binary tree splittingstructure according to an embodiment of the present invention.

Referring to FIG. 7 , there are various types of the quadtree plusasymmetric binary tree splitting: quadtree splitting (QT_SPLIT),horizontal symmetric splitting (HOR), vertical symmetric splitting(VER), horizontal upper-side asymmetric splitting (HOR_UP), horizontallower-side asymmetric splitting (HOR_DOWN), vertical left-sideasymmetric splitting (VER_LEFT), and vertical right-side asymmetricsplitting (VER_RIGHT). Thus, with the quadtree plus asymmetric binarytree splitting (namely, a asymmetric binary tree splitting after aquadtree splitting), it is possible to split a block into squaresub-blocks or non-square sub-blocks.

FIG. 8 is a diagram illustrating recursive execution of asymmetricbinary tree splitting in a quadtree plus asymmetric binary treesplitting structure.

Referring to FIG. 8 , a block that has undergone an asymmetric binarytree splitting is further recursively split by an asymmetric binary treesplitting. In this case, the asymmetric binary tree splitting structuresare categorized into a binary symmetric split, a binary asymmetric splitin which the size is split by the power of 2 (for example, S/4 or3*S/4), and a ternary asymmetric binary split (for example, S/3 or2*S/3). Here, S represents the horizontal size or the vertical size of ahigher-level block.

In the meantime, for the quadtree plus asymmetric binary tree splitting,at least one of the following flags is signaled: a first flag indicatingwhether a quadtree splitting needs to be performed; a second flagindicating whether a binary tree splitting needs to be performed; athird flag indicating a horizontal split or a vertical split; a fourthflag indicating a symmetric split or an asymmetric split; and a fifthflag indicating the type of asymmetric splitting (for example,left/upper or right/lower). The first flag may have a first valueindicating that a quadtree splitting needs to be performed or a secondvalue indicating that no further splitting needs to be performed. Thesecond flag may have a first value indicating that a binary treesplitting needs to be performed or a second value indicating that nofurther splitting needs to be performed. The third flag may have a firstvalue indicating a horizontal split or a second value indicating avertical split. The fourth flag may have a first value indicating asymmetric split or a second value indicating an asymmetric split. Thefifth flag may have a first value indicating a left side or an upperside or a second value indicating a right side or a lower side. Thesecond flag is signaled only when the first flag has the second value.The third flag and the fourth flag are signaled only when the secondflag has the first value. The fifth flag is signaled only when thefourth flag has the second value. Further, when it is determined that aCU cannot be further split on the basis of the size and/or depth of theCU, the first flag, the second flag, the third flag, the fourth flag,and/or the fifth flag is not signaled. Here, instead of the fifth flag,a first index indicating an asymmetric split can be signaled.

On the other hand, the first flag, the second flag, the third flag, thefourth flag, and the fifth flag (or the first index) are signaled asseparate pieces of information, or some or all of the first throughfifth flags may be collectively signaled as a single piece ofinformation.

At least either one of binary tree splitting availability informationand asymmetric splitting availability information is signaled at ahigher level (for example, a video sequence level, a picture level, aslice level, a tile level, or a CTU level) than a CU. In this case,whether to signal the second flag, the third flag, the fourth flag, andthe fifth flag (or the first index) is determined on the basis of atleast one of the binary tree splitting availability information and theasymmetric splitting availability information. For example, when thebinary tree splitting is not available, the second flag, the third flag,the fourth flag, and the fifth flag (or the first index) are notsignaled. For example, when the binary tree splitting is available andthe asymmetric splitting is not available, the fourth flag and the fifthflag (or the first index) are not signaled.

Alternatively, on the basis of the size and/or depth of a CU, whetherthe CU can be split by binary tree splitting or by asymmetric splittingis determined. For example, when an interest CU has a size that cannotbe asymmetrically split, the fourth flag and the fifth flag (or thefirst index) for the interest CU are not signaled.

FIG. 9 is a diagram illustrating signaling of the quadtree plusasymmetric binary tree splitting structure.

Referring to FIG. 9 , by signaling a maximum of two bins in addition tothe quadtree plus symmetric binary tree partitioning structure, thequadtree plus asymmetric binary tree partitioning structure can berepresented.

In FIG. 9 , a first bin indicates whether or not the asymmetric binarytree splitting is to be used. When the first bin is “asymmetric” whichindicates that the asymmetric binary tree splitting is to be used, asecond bin indicating the type of asymmetric splitting is additionallysignaled.

On the other hand, the added two bins as illustrated in FIG. 9 areentropy-encoded/decoded as a single context.

As an example of the quadtree plus asymmetric binary tree splitting,there is a partitioning structure called “quadtree plus shifted binarytree splitting”. The quadtree plus shifted binary tree splitting means apartitioning structure in which quadtree splitting is performed firstand binary tree splitting with shifting is then performed.

FIGS. 10 and 11 illustrate an example of the quadtree plus shiftedbinary tree splitting.

FIG. 10 illustrates one embodiment of the quadtree plus shifted binarytree splitting in which splitting by the powers of 2 is possible.

In FIG. 10 , the first row shows examples of quadtree splitting,horizontal symmetric splitting, and vertical symmetric splitting,respectively. In FIG. 10 , the second row shows examples of 1:3 shiftedbinary tree splitting in various directions, and the third row showsexamples of 3:5 shifted binary tree splitting in various directions.

When the horizontal size or the vertical size of a block is 2^(n) (n isa positive integer) and is equal to or smaller than M (here, M is apositive integer of, for example, 16), the block undergoes shiftedbinary tree splitting with a split ratio of 1:3, thereby generatingsmaller sub-blocks having a ¼ size and a ¾ size. When the horizontalsize or the vertical size of a block is 2^(n) and is larger than M, theblock undergoes shifted binary tree splitting with a split ratio of 3:5,thereby generating sub-blocks having a ⅜ size and a ⅝ size.

FIG. 11 illustrates one embodiment of the quadtree plus shifted binarytree splitting structure in which the splitting by the powers of 2 isnot possible.

The first row, the second row, and the third row show examples ofshifted binary tree splitting in various directions with a split ratioof 1:2, 1:4, and 2:3, respectively.

When the horizontal size or the vertical size of a block is not 2^(n) (nis a positive integer) but is 3×2^(n), the block undergoes a shiftedbinary tree splitting with a split ratio of 1:2, thereby generatingsub-blocks having a ⅓ size and a ⅔ size. When the horizontal size or thevertical size of a block is not 2^(n) but is 5×2^(n), the blockundergoes a shifted binary tree splitting with a split ratio of 1:4 togenerate sub-blocks having a ⅕ size and a ⅘ size or undergoes a shiftedbinary tree splitting with a split ratio of 2:3 to generate sub-blockshaving a ⅖ size and a ⅗ size.

FIG. 12 is a diagram for description of signaling of a quadtree plusbinary tree with shifting (QT+BTS) splitting structure.

The splitting by the binary tree with shifting (BTS) structure can bedetermined according to a split direction and a split ratio.

A binary tree split direction is entropy-encoded/decoded on the basis ofa split direction of the previous splitting. In other words, instead ofsignaling a horizontal or vertical split, a perpendicular split or aparallel split can be signaled.

The perpendicular split means the opposite direction split with respectto the preceding splitting. For example, when the preceding splitting isa vertical direction split and the perpendicular split is signaled, acurrent block undergoes a horizontal split.

In contrast, the parallel split means the same direction split as thepreceding splitting. For example, when the preceding splitting is avertical direction split and the parallel split is signaled, a currentblock undergoes a vertical split.

Referring to FIG. 12 , the first splitting is set according to therules. For two split directions (perpendicular and parallel), two binaryflags (i.e., perpend_split_flag and parallel_split_flag) are signaled.Subsequently, the split ratio is signaled using a binary decision tree.

In FIG. 12 , since the hierarchical tree constructed under theperpendicular split is the same as that constructed under the parallelsplit, the same hierarchical tree structure is not illustrated. When aparticular node has only a single child (leaf node), the splitinformation is not signaled.

When a CU is split in accordance with a quadtree plus asymmetric binarytree splitting structure, which prediction (intra prediction or interprediction) needs to be performed is determined at a block size level of2×6, 2×14, 6×2, 14×2, or larger.

In the quadtree plus binary tree splitting structure, parameters for thenext block splitting are defined and then entropy-encoded/decoded inunits of a higher level. The higher-level units include at least one ofa video parameter set (VPS), a sequence parameter set (SPS), a pictureparameter set (PPS), a tile header, a slice header, and a coding treeunit (CTU).

CTUSize represents a quadtree root node size.

MinQtSize represents a minimal allowed quadtree lead node size.

MaxBtSize represents a maximal allowed binary tree root node size.

MaxBTDepth represents a maximal allowed binary tree depth.

MinBtSize represents a minimal allowed binary tree lead node size.

At least one of the parameters of the above-described block splittingstructure can be used as the parameters of at least one of a luma signaland a chroma signal.

In addition, at least one of the parameters of the block splittingstructure is entropy-encoded/decoded separately for the luma signal andthe chroma signal to have different parameter values for the luma signaland the chroma signal. Furthermore, at least one of the parameters ofthe block splitting structure is entropy-encoded/decoded separately fora Cb signal and a Cr signal to have different parameter values for theCb signal and the Cr signal.

At least one of the parameters of the block splitting structure can beused as the parameter of each slice type (namely, I, P, or B).

In addition, at least one of the parameters of the block splittingstructure is entropy-encoded/decoded separately for each slice type tohave different parameter values for the respective slice types.

In addition, at least one of the parameters of the block splittingstructure may be determined on the basis of the comparison resultbetween the depth or size of a current block and a predeterminedthreshold value. The predetermined threshold value means a referencedepth or size deciding the block structure. The threshold value can berepresented in the form of at least one of a minimum value and a maximumvalue. The predetermined threshold value is a fixed value that is presetat an encoder and a decoder side, or a variable value derived on thebasis of the coding parameters of a current block or a neighboringblock. Alternatively, the predetermined threshold value may be signaledas a piece of information included in a bitstream.

An example of the quadtree plus binary tree splitting structure, theCTUSize is set to 128×128 luma samples or 64×64 chroma samples.

The MinQTSize is set to 16×16 samples, the MaxBTSize is set to 64×64samples, the MinBTSize is set to 4×4 samples in each dimension (each ofthe width and the height), and the MaxBTDepth is set to four (4).

A CTU undergoes quadtree splitting to generate quadtree leaf nodes.

The quadtree splitting is recursively performed until the MinQTSize isreached.

The size of the quadtree leaf node ranges from a size of 16×16 samples(namely, the MinQTSize) to a size of 128×128 samples (namely, theCTUSize).

When a quadtree leaf node has a size of 128×128 samples, since itsMaxBTsize is larger than 64×64 samples, the binary tree splitting is notperformed. Otherwise, (that is, when a quadtree leaf node has a sizesmaller than 64×64 samples), the quadtree leaf node is split by binarytree splitting. In other words, when the size of a quadtree leaf node isnot larger than the MaxBTSize, the quadtree leaf node is recursivelysplit by binary tree splitting. Thus, the quadtree leaf node serves asthe root node of a binary tree and may have a binary tree depth of zero.

When the binary tree depth reaches the MaxBTDEpth=4, no further binarytree splitting is performed. When the horizontal size (width) of abinary tree node is equal to the MinBTSize=4, the binary tree node doesnot undergo additional horizontal symmetric splitting. Similarly, whenthe vertical size (height) of a binary tree node is equal to theMinBTSize=4, the binary tree node does not undergo additional verticalsymmetric splitting. When the horizontal size (width) of a binary treenode is equal to the MinBTSize=4, the binary tree node does not undergoadditional vertical symmetric splitting. Similarly, when the verticalsize of a binary tree node is equal to the MinBTSize=4, the binary treenode does not undergo additional horizontal symmetric splitting.

These binary tree leaf nodes undergo at least one of processes includingprediction, transform, quantization, dequantization, inverse transform,and transform coefficient encoding/decoding, without undergoing anadditional splitting.

The aforementioned values of the CTUSize, MinQTSize, MaxBTSize,MaxBTDepth, and MinBTSize are presented only for illustrative purposesand are not limited thereto.

In the quadtree plus binary tree splitting structure, when at least oneof the block size, the split depth, and the region to undergo thequadtree splitting is identical to at least one of the block size, thesplit depth, and the region to undergo the binary tree splitting,information of the quadtree partition structure and information of thebinary tree partition structure are signaled together. In this case,when the overlapping of at least one of the block size, the split depth,and the region between the quadtree splitting structure and the binarytree splitting structure is minimized, for at least one of the blocksize, the split depth, and the region, the information of only thequadtree splitting structure can be signaled, and the information ofonly the binary tree splitting structure can be signaled.

To this end, at least one of the parameters for a quadtree plus binarytree block splitting structure may be determined on the basis of thecomparison between a predetermined threshold value and at least one ofthe block size, the split depth, and the region. The predeterminedthreshold value may mean at least one of a reference block size, areference split depth, and a reference region to determine the blockstructure. The threshold value can be represented in the form of atleast one of a minimum value and a maximum value. The predeterminedthreshold value is a fixed value that is preset at the encoder side andthe decoder side, or a variable value derived on the basis of the codingparameters of a current block or a neighboring block. Alternatively, thepredetermined threshold value may be signaled as a piece of informationincluded in a bitstream.

For example, at the encoder side and the decoder side, the minimalallowed quadtree lead node size MinQTSize may be set to a fixed value ofN×N, and the maximal allowed binary tree root node size MaxBTSize may beset to a fixed value of M×M. Here, M is less than N. For example, N is afixed value of 16 and M is a fixed value of 8.

Combined Quadtree and Binarytree (CQB) Splitting

A partitioning structure according to one embodiment of the presentinvention can be a combined quadtree and binary tree (CQB) splittingstructure. The combined quadtree and binary tree splitting structurerefers to a partitioning structure in which a quadtree split and abinary tree split can be performed without priority. As described above,in the quadtree plus binary tree splitting structure, a quadtree splitis necessarily performed first. However, in the combined quadtree andbinary tree (CQB) splitting structure, it is not necessary that thequadtree splitting precedes the binary tree splitting. That is, thebinary tree splitting can precede the quadtree splitting.

FIG. 13 illustrates a combined quadtree and binary tree splittingstructure according to an embodiment of the present invention.

Referring to FIG. 13 , in the combined quadtree and binary treesplitting structure, a CU undergoes a quadtree split or a binary treesplit. Here, when the CU is to be divided into two smaller units, the CUwill be split by binary tree splitting. Meanwhile, when the CU is to bedivided into four smaller units, the CU will be split by quadtreesplitting. Since the CUs are generated by performing the combinedquadtree and binary tree splitting on a CTU, each CU may have a squareshape or a non-square (rectangular) shape.

By using the combined quadtree and binary tree splitting structure, itis possible to encode/decode an image in the form of non-square blockshaving a width not less than a first particular value and a height notless than a second particular value.

For the combined quadtree and binary tree splitting, either or both of afirst index and a second index are signaled: the first index indicatinga quadtree split, a binary tree split, or no further split; and thesecond index indicating a horizontal split or a vertical split.

The first index may have a first value indicating no further split, asecond value indicating a quadtree split, or a third value indicating abinary tree split. The first flag may have a first value indicating ahorizontal split (namely, a width direction split) or a second valueindicating a vertical split (namely, a height direction split). Thefirst flag is signaled only when the first index has the third value.

Here, when a quadtree split is performed on the basis of the value ofthe first index, all child nodes resulting from the split have a sizehalf the size of the parent node in each dimension. In this case, allthe child nodes include four nodes and have an equal size. Here, theparent node refers to a target block to be split, and the child noderefers to a block generated through the splitting of the target block.Each child node has a size of M×N. Here, M and N each are positiveintegers, such as 1, 2, 4, 8, 16, 32, and so forth.

When a block is split in the form of a binary tree structure on thebasis of the first index and the first flag, the second index indicatingsplit position information is additionally signaled.

The current block is split in the form of a binary tree structure on thebasis of the split position information. For the horizontal binary treesplitting, the split position information means an offset per N samples(per N-sample offset) with reference to at least one of the position,size, and shape of the parent node. In this case, a per N-sample offsetfrom the upper end of the parent node or a per N-sample offset from thelower end of the parent node may mean the split position information.Where N is a positive integer, such as 1, 2, 4, 8, 16, 32, and so forth.

Similarly, for a vertical binary tree split, the split positioninformation means an offset per N samples (per N-sample offset) withreference to at least one of the position, size, and shape of the parentnode. In this case, a per N-sample offset from the left end of theparent node or a per N-sample offset from the right end of the parentnode may mean the split position information.

The split position information is signaled in the form of an indexindicating a value within a pre-configured set of offsets, which isconfigured on the basis of the width (horizontal size) or the height(vertical size) of a block.

Here, the N value, which is the processing unit for offsetting, isentropy-encoded/decoded in units of a higher level and is then be usedto represent the combined quadtree and binary tree splitting structure.The higher-level units include at least one of a video parameter set(VPS), a sequence parameter set (SPS), a picture parameter set (PPS), atile header, a slice header, and a coding tree unit (CTU). The N valuecan be used as the parameter of at least one of luma and chroma signals.In addition, the N value may be entropy-encoded/decoded separately forthe luma signal and the chroma signal to have different parameter valuesfor the luma signal and the chroma signal. The N value may beentropy-encoded/decoded separately for a Cb signal and a Cr signal tohave different values for the Cb signal and the Cr signal. The N valuemay be used as the parameter of each slice type (I, P, or B). Inaddition, the N value may be entropy-encoded/decoded separately for eachslice type to have different parameter values for the respective slicetypes.

The N value may be a fixed value that is preset at the encoder side andthe decoder side, or a variable value derived on the basis of the codingparameters of a current block or a neighboring block. In addition,according to the N value, at least one of a context model decision and acontext model update is performed on the basis of the depth or the sizeof the current block. Alternatively, at least one of the context modeldetermination and the context model update is performed on the basis ofanother flag or index indicating the block splitting structure.

At least one of the aforementioned indexes and flags isentropy-encoded/decoded at a CU level, a CTU level, or a higher level.Alternatively, at least one of the indexes and the flags may be a fixedvalue preset at the encoder side and the decoder side, or may be avariable value derived on the basis of the coding parameters of acurrent block or a neighboring block.

According to at least one of the indexes and the flags, at least one ofthe context model decision and the context model update is performed isperformed on the basis of the depth or the size of a current block. Atleast one of the context model decision and the context model update isperformed on the basis of another flag and another index indicating theblock splitting structure.

A CTU can be split by a quad tree structure or a binary tree structure.At this time, the quadtree leaf node or the binary tree leaf node meansa coding unit (CU).

In the combined quadtree and binary tree splitting structure, theparameters of the splitting structure of the next block are defined, areentropy-encoded/decoded at a higher level, and are used to represent thecombined quadtree and binary tree form block splitting structure. Thehigher-levels include at least one of a video parameter set (VPS), asequence parameter set (SPS), a picture parameter set (PPS), a tileheader, a slice header, and a CTU.

CTUSize represents a root node size.

MinCUSize represents a minimal allowed leaf node size.

MaxCUDepth represents a maximal allowed CU depth.

At least one of the parameters of the above-described block splittingstructure can be used as the parameter of at least one of luma andchroma signals.

In addition, at least one of the parameters of the block splittingstructure is entropy-encoded/decoded separately for the luma signal andthe chroma signal to have different parameter values for the luma signaland the chroma signal. At least one of the parameters of the blocksplitting structure is entropy-encoded/decoded separately for a Cbsignal and a Cr signal to have different parameter values for the Cbsignal and the Cr signal.

At least one of the parameters of the block splitting structure can beused as the parameter of each slice type (namely, I, P, or B).

In addition, at least one of the parameters of the block splittingstructure is entropy-encoded/decoded separately for each slice type tohave different parameter values for the respective slice types.

In addition, at least one of the parameters of the block splittingstructure may be determined on the basis of the comparison resultbetween the depth or size of a current block and a predeterminedthreshold value. The predetermined threshold value means a referencedepth or size that determines a block structure. The threshold value canbe represented in the form of at least one of a minimum value and amaximum value. The predetermined threshold value is a fixed value thatis preset at the encoder side and the decoder side, or a variable valuederived on the basis of the coding parameters of a current block or aneighboring block. Alternatively, the predetermined threshold value maybe signaled as a piece of information included in a bitstream.

For example, in the combined quadtree and binary tree splittingstructure, the CTUSize is a size of 128×128 luma samples or a size of64×64 chroma samples.

The MinCUSize is set to 4×4 samples, and the MaxCUDepth is set to five(5). A CTU undergoes quadtree or binary tree splitting to generate leafnodes. The quadtree splitting or the binary tree splitting isrecursively performed until the block size reaches the MinCUSize.

When the CU depth reaches the MaxCUDepth=5, no further splitting isperformed. In addition, when the horizontal size or the vertical size ofa quadtree node is equal to the MinCUSize=4, no further splitting isperformed. When the horizontal size of the binary tree node is equal tothe MinCUSize=4, no further horizontal symmetric splitting is performed.Similarly, when the vertical size of the binary tree node is equal tothe MinCUSize=4, no further vertical symmetric splitting is performed.In addition, when the horizontal size of the binary tree node is equalto the MinCUSize=4, no further vertical symmetric splitting isperformed. Similarly, the vertical size of the binary tree node is equalto the MinCUSize=4, no further horizontal symmetric splitting isperformed.

When a CU is split by using the combined quadtree and binary treesplitting structure, which prediction mode between intra prediction andinter prediction is used is determined in units of a block having a sizeof 2×4, 4×4, 4×2, 4×8, 8×4, or larger, which is the leaf node size setMinCUSize. The leaf node undergoes at least one of processes such asprediction, transform, quantization, dequantization, inverse transform,and transform coefficients encoding/decoding, without undergoing furthersplitting.

The above-mentioned values of the CTUSize, the MinCuSize, and theMaxCuDepth are presented for illustrative purposes and are not limitedthereto.

QuadTree plus BinaryTree and TernaryTree (QT+BTTT)

One embodiment of the present invention provides a quadtree plusbinary/ternary tree splitting structure. The quadtree plusbinary/ternary tree splitting refers to a partitioning structure inwhich a quadtree splitting is primarily performed and a binary orternary tree splitting is secondarily performed. Here, thebinary/ternary tree may be the combined tree which has been describedwith reference to FIG. 3 . Accordingly, the quadtree plus binary/ternarytree splitting structure can be referred to as a quadtree plusmulti-type tree splitting structure.

FIGS. 14A, 14B, 14C, 14D and 14E illustrate splitting forms used in thequadtree plus binary/ternary tree splitting, in which 14A representsquadtree splitting, 14B represents vertical binary tree splitting, 14Crepresents horizontal binary tree splitting, 14D represents verticalternary tree splitting, and 14E represents horizontal ternary treesplitting.

FIGS. 15 15A, 15B, 15C and 15D illustrate examples of partitioning,including vertical binary tree splitting (BI_VER_SPLIT), horizontalbinary tree splitting (BI_HOL_SPLIT), vertical ternary tree splitting(TRI_VER_SPLIT), and horizontal ternary tree splitting according to ablock type. BI_VER_SPLIT, BI_HOL_SPLIT, TRI_VER_SPLIT, and TRI_HOL_SPLITmean a vertical binary tree splitting mode, a horizontal binary treesplitting mode, a vertical ternary tree splitting mode, and a horizontalternary tree splitting mode, respectively. Aside from these, there areadditional splitting modes: NO_SPLIT indicating no further splitting;and QUAD_SPLIT indicating a quadtree splitting mode.

When the quadtree plus binary/ternary tree splitting is performed, a CTUis first split by a quadtree splitting and then the maximum-sized CU isfurther recursively split by at least one of the binary tree splittingand the triple tree splitting. For example, when a CTU has a 256×256size, the CTU is split into four 128×128 CUs, and each of the 128×128CUs is the maximum CU and can be more deeply split.

By using the binary/ternary tree splitting structure, square CUs andnon-square CUs can be generated.

When a CTU has a 128×128 size, the CTU may not undergo a quadtreesplitting.

In the above-mentioned embodiments, the form of a CU is represented by aratio of the horizontal size and the vertical size of the CU. Forexample, when the horizontal size is identical to the vertical size, theCU can be represented as a 1:1 CU or a square CU. When the horizontalsize is 64 and the vertical size is 16, the CU is represented as a 1:4CU or a non-square CU.

The block partitioning is performed on the basis of an allowed blocksplit type, a minimal allowed size, and a maximum allowed size. That is,the number of allowable block splitting modes is determined on the basisof information of a minimum size and a maximum size for each block splittype.

Specifically, allowable splitting modes for a current CU vary dependingon signaling of a higher-level. For example, for each CU form, themaximum size and the minimum size are signaled with a higher-levelparameter set or header. (Here, all sizes are represented in a log 2scale, and minus2 is a value obtained by subtracting two from the log 2scale original size.)

log 2_cu_11_ratio_max_minus2: a maximal allowed size of a 1:1 CU.

log 2_cu_11_ratio_min_minus2: a minimal allowed size of a 1:1 CU.

log 2_cu_12_ratio_max_minus2: a maximal allowed size of a 1:2 CU or a2:1 CU (longer side).

log 2_cu_12_ratio_min_minus2: a minimal allowed size of a 1:2 or 2:1 CU(longer side).

log 2_cu_14_ratio_max_minus2: a maximal allowed size of a 1:4 or 4:1 CU(longer side).

log 2_cu_14_ratio_min_minus2: a minimal allowed size of a 1:4 or 4:1 CU(longer side).

log 2_tri_split_max_minus2: a maximal allowed size of a ternarysplitting tree (longer side).

log 2_tri_split_min_minus2: a minimal allowed size of a ternary treepartition (longer side).

For example, when a CU has a size of 128×128 samples and the log2_cu_12_ratio_max_minus2 is 4 (namely, the maximal allowed size of a 1:2CU is 64), vertical splitting mode and horizontal splitting mode are notallowed.

For another example, when a CU has a horizontal size greater than 64 anda vertical size greater than 64, the horizontal binary tree splittingwill not be allowed. In addition, a CU has a horizontal size greaterthan 64 and a vertical size of 64, information related to the horizontalbinary tree splitting is not signaled. Otherwise, the horizontal binarytree splitting is allowed and information related to the horizontalbinary tree splitting is signaled.

For a further example, when a CU has a vertical size greater than 64 anda horizontal size of 64, the vertical binary tree splitting is notallowed. In addition, when a CU has a vertical size greater than 64 anda horizontal size of 64, information related to the vertical binary treesplitting is not signaled. Otherwise, the vertical binary tree splittingis allowed and information related to the vertical binary tree splittingis signaled.

The horizontal and/or vertical size of a CU is not limited to 64. Thehorizontal and/or vertical size of a CU cannot be compared with thevalue of M. In addition, the M has the same value as the maximum valueof the horizontal and/or vertical size of a transform or inversetransform unit. In addition, the M has the same value as the maximumvalue of the horizontal and/or vertical size of a transform or inversetransform matrix.

The value of the M may be entropy-encoded/decoded at one or more levelsincluding a video parameter set (VPS), a sequence parameter set (SPS), apicture parameter set (PPS), a tile header, a slice header, and a codingtree unit (CTU). Alternatively, the M may be a value which is preset atthe encoder side and the decoder side.

For a further example, when a CU has a size of 128×128 samples and thelog 2_tri_split_max_minus2 is four (namely, a ternary tree maximalallowed size is 64), a ternary tree splitting mode may not be allowed.That is, a CU has a horizontal size greater than 64 and a vertical sizegreater than 64, the ternary tree splitting may not be allowed.Alternatively, when a CU has a horizontal size or a vertical sizegreater than 64, information related to the ternary tree splitting maynot be signaled. When a CU has a horizontal size and a vertical sizewhich are equal to or less than 64, the ternary tree splitting isallowed. In addition, when a CU has a horizontal size or a vertical sizewhich is equal to or less than 64, information related to the ternarytree splitting is not signaled. In this case, as the ternary treesplitting, at least one of the horizontal ternary tree splitting and thevertical ternary tree splitting is used.

For a further example, when a CU is greater than 64 in both of thehorizontal size and the vertical size, the ternary tree splitting maynot be allowed. In addition, when a CU is greater than 64 in both of thehorizontal size and the vertical size, information related to theternary tree splitting is not signaled. Accordingly, when a CU is equalto or less than 64 in both of the horizontal size and the vertical size,the ternary tree splitting may be allowed. In addition, when a CU isequal to or less than 64 in both of the horizontal size and the verticalsize, information related to the ternary tree splitting may be signaled.In this case, as the ternary tree splitting, at least one of thehorizontal ternary tree splitting and the vertical ternary treesplitting may be used.

For a further example, when a CU has a horizontal size greater than 64and a vertical size equal to 64, the ternary tree splitting may not beallowed. In addition, when a CU has a horizontal size greater than 64and a vertical size equal to 64, information related to the ternary treesplitting may not be signaled. Accordingly, when a CU is equal to orless than 64 in both of the horizontal size and the vertical size, theternary tree splitting may be allowed. In addition, when a CU is equalto or less than 64 in both of the horizontal size and the vertical size,information related to the ternary tree splitting may be signaled. Inthis case, as the ternary tree splitting, at least one of the horizontalternary tree splitting and the vertical ternary tree splitting is used.

For a further example, when a CU has a vertical size greater than 64 anda horizontal size equal to 64, the ternary tree splitting is notallowed. In addition, when a CU has a vertical size greater than 64 anda horizontal size equal to 64, information related to the ternary treesplitting is not signaled. Accordingly, when a CU is 64 or less in bothof the horizontal size and the vertical size, the ternary tree splittingis allowed. In addition, when a CU is 64 or less in both of thehorizontal size and the vertical size, information related to theternary tree splitting is signaled. In this case, as the ternary treesplitting, at least one of the horizontal ternary tree splitting and thevertical ternary tree splitting is used.

The horizontal and/or vertical size of a CU is not limited to 64. Thehorizontal and/or vertical size of a CU may be compared with N. The Nmay have the same value as the maximum value of the horizontal sizeand/or the vertical size of a transform or inverse transform block.Alternatively, the N may have the same value as the maximum value of thehorizontal and/or vertical size of a transform or inverse transformmatrix.

The value of the N may be entropy-encoded/decoded in units of at leastone of a video parameter set (VPS), a sequence parameter set (SPS), apicture parameter set (PPS), a tile header, a slice header, and a codingtree unit (CTU). The N may be a value preset at the encoder side and thedecoder side.

FIG. 16 is a diagram for description of allowable splitting modes in thequadtree plus binary/ternary tree splitting structure.

When a current CU has a size of 64×64 samples, log2_tri_split_max_minus2 is 4 (namely, a CU maximum size that allows theternary tree splitting is 64), log 2_cu_12_ratio_max_minus2 is 4(namely, the maximal allowed size of a 1:2 CU is 64), and log2_cu_14_ratio_max_minus2 is 3 (namely, the maximal allowed size of a 1:4CU is 32), a vertical ternary tree mode (TRI_VER_SPLIT) in which CUshaving a 16×64 size or a 64×16 size are generated or a horizontalternary tree mode (TRI_HOR_SPLIT) in which CUs having a 16×64 size or a64×16 size are generated are not allowed.

When a current CU has a 32×64 size, log 2_tri_split_max_minus2 is 4(namely, a maximum CU size that allows the ternary tree splitting is64), log 2_cu_12_ratio_max_minus2 is 4 (namely, the maximal allowed sizeof a 1:2 CU is 64), and log 2_cu_14_ratio_max_minus2 is 3 (namely, themaximal allowed size of a 1:4 CU is 32), a vertical binary tree mode(BI_VER_SPLIT) and a vertical ternary tree mode (TRI_VER_SPLIT) in whichCUs having a 16×64 size or a 64×16 size are generated are not allowed.

FIG. 17A, FIG. 17B, FIGS. 17C and 17D are diagrams illustrating anembodiment of bit allocation in each allowable splitting mode.

Referring to FIG. 17 , when the number of allowable splitting modes isone, one bit is allocated for representation of the splitting mode. Whenthe number of allowable splitting modes is two, a maximum of two bitsare allocated for representation of the splitting mode. When the numberof allowable splitting modes is three or four, a maximum of three bitsare allocated for representation of the splitting mode.

FIG. 18 is a diagram for description of signaling of the quadtree plusbinary/ternary tree splitting structure.

Referring to FIG. 18 , when a current block is split in accordance withthe quadtree plus binary/ternary tree splitting structure, the first binrepresents whether or not quadtree splitting is performed, the secondbin represents whether or not the binary/ternary tree splitting isperformed, the third bin indicates either a vertical split or ahorizontal split, the fourth bin indicates either the binary treesplitting or the ternary tree splitting, and the fifth and sixth binsrepresent the type of the binary tree splitting.

The bins shown in FIG. 18 are signaled as a plurality of syntax elements(or multiple pieces of information) or as one syntax element (or onepiece of information). When signaled as the plurality of syntaxelements, at least one of a first flag, a second flag, a third flag, afourth flag, and a first index is signaled: the first flag indicatingwhether or not quadtree splitting is performed; the second flagindicating whether or not the binary/ternary tree splitting isperformed; the third flag indicating either a vertical split or ahorizontal split; the fourth flag indicating either the binary treesplitting or the ternary tree splitting; and the first index indicatingthe type of the binary tree splitting.

In FIG. 18 , the third bin indicates either a vertical split or ahorizontal split, the fourth bin indicates either the binary treesplitting or the ternary tree splitting. However, the invention is notlimited thereto. The third bin may indicate at least one of the binarytree splitting and the ternary tree splitting, and the fourth bin mayindicate at least one of a horizontal split and a vertical split.

In the quadtree plus binary/ternary tree splitting structure, thefollowing parameters are defined, and entropy-encoded/decoded at ahigher level. The higher-level units include at least one of a videoparameter set (VPS), a sequence parameter set (SPS), a picture parameterset (PPS), a tile header, a slice heater, and a coding tree unit (CTU).

CTUSize represents a quadtree root node size.

MinQtSize represents a minimal allowed quadtree leaf node size.

MaxBtSize represents a maximal allowed binary tree root node size.

MaxTtSize represents a maximal allowed ternary tree root node size.

MaxMttDepth represents a maximal allowed binary/ternary tree depth.

MinBtSize represents a minimal allowed lead node size.

MinTtSize represents a minimal allowed ternary tree leaf node size.

A block having a horizontal size or a vertical size greater than amaximum transform size is automatically split. That is, when at leastone of the horizontal size and the vertical size of a block is greaterthan the maximum transform size, the quadtree splitting is automaticallyperformed without explicit signaling.

For example, a coding unit (CU) (or a coding block (CB)) having ahorizontal size or a vertical size greater than the maximum transformsize (namely, 64) is assumed to be further split by quadtree splitting,without explicit signaling (namely, implicitly).

In another embodiment, in an intra slice, the value of a coded blockflag (CBF) is assumed to be zero when a CU has a horizontal size or avertical size greater than 64.

In an intra slice, for a CU having a horizontal size or a vertical sizegreater than 64, a skip mode is derived and applied.

On the other hand, in an inter slice, for a CU having a horizontal sizeor a vertical size greater than 128, at least one of a skip mode and anAMVP mode (CBF=0) is applied. The CBF of the AVMP mode is not signaledbut is assumed to be zero.

In the quadtree plus binary/ternary tree splitting structure, there maybe overlapping split patterns. In this case, a particular splittingstructure can be forbidden to prevent the overlapping split patterns.

For example, two consecutive stages of binary tree splitting in a firstdirection can produce the same partitions as a combined process in whichone stage of ternary tree splitting in the first direction is firstperformed and one stage of binary tree splitting in the first directionis then performed on a center-positioned block in some cases. That is,the partitions produced by two consecutive stages of binary treesplitting may overlap as the partitions produced by a combined processconsisting of one stage of ternary tree splitting and the subsequentstage of binary tree splitting at a center-positioned block.Accordingly, to prevent overlapping partitions, the binary treesplitting on the center-positioned block may not be allowed after theternary tree splitting is performed.

In the quadtree plus binary/ternary tree splitting structure, a treenode block may exist at the lower boundary of an image or may span theright boundary of the image. To enable all the CUs to be present insidethe boundary of an image, the tree node blocks existing at the lowerboundary or spanning the right boundary may be split in mannersdescribed below.

(1) When a tree node block covers both of the lower boundary and theright boundary of an image,

-   -   when a current block is a quadtree node block and has a size        larger than the maximal allowed quadtree lead node size, the        current block is split by the quadtree splitting, and    -   otherwise, the current block is split by the horizontal binary        tree splitting.

(2) When a tree node block covers the lower boundary of an image,

-   -   when a current block is a quadtree node block and has a size        larger than the minimal allowed quadtree leaf node size and then        the maximal allowed binary tree root node size, the current        block is split by the quadtree splitting,    -   when a current block is a quadtree node block and has a size        larger than the minimal allowed quadtree leaf node size and        smaller than the maximal allowed binary tree root node size, the        current block is split by the quadtree splitting or the        horizontal binary tree splitting, and    -   otherwise, the current block is split by the horizontal binary        tree splitting.

(3) When an image of a tree node block covers the right boundary,

-   -   when a current block is a quadtree node block and has a size        larger than the minimal allowed quadtree leaf node size and        larger than the maximal allowed binary tree root node size, the        current block is split by the quadtree splitting,    -   when a current block is a quadtree node block and has a size        larger than the minimal allowed quadtree leaf node size and        equal to or smaller than the maximal allowed binary tree root        node size, the current block is split by the quadtree splitting        or the vertical binary tree splitting, and    -   otherwise, the current block is split by the vertical binary        tree splitting.

Split To Square (STS)

One embodiment of the present invention provides a split-to-square (STS)splitting structure. The split-to-square splitting structure refers to apartitioning structure in which square splitting is further performed inaddition to the binary/ternary tree splitting in the quadtree plusbinary/ternary tree splitting. Here, the split-to-square splitting meansa process of splitting a block into square sub-blocks. That is, in thequadtree plus binary/ternary tree splitting, when a ratio of thehorizontal size and the vertical size of a block is 1:1, 1:4, or 4:1,the split-to-square structure is applied. For example, when thesplit-to-square structure is applied to a block having a 64×16 size,four CUs having a 16×16 size are generated.

In the present embodiment, FIG. 19 illustrates a binarization table forsignaling of information on the STS structure.

The leaf node in the splitting structures according to theabove-described embodiments of the present invention is defined as a CU.In this case, the CU is used as the basic unit of prediction ortransform without being additionally split. That is, among the quadtreeplus binary tree splitting structure, the combined quadtree and binarytree splitting structure, the quadtree plus binary/ternary treesplitting structure, and the split-to-square splitting structure, a CU,a PU, and a TU may have the same shape and size in at least one of thesplitting structures.

In addition, the choice of intra prediction or inter prediction isdetermined on a per-CU basis. That is, in the quadtree plus binary treeblock splitting structure, at least one process among intra prediction,inter prediction, transform, inverse transform, quantization,dequantization, entropy-encoding/decoding, and in-loop filtering isperformed on a per square block basis or a per non-square (rectangular)block basis.

One CU consists of one luma component block Y and two chroma componentblocks Cb and Cr. Alternatively, one CU can consist of only one lumacomponent block or only two chroma component blocks. Furtheralternatively, one CU may consist of only one luma component block, onlya Cr chroma component block, or only a Cb chroma component block.

Separated PU/TU Tree Splitting

One embodiment of the present invention provides a separated PU/TU treesplitting structure. The separated PU/TU tree splitting structure refersto a partitioning structure in which a CTU is not split into CUs but issplit into PUs and TUs. The PU splitting and the TU splitting can beperformed by at least one of the quadtree splitting, the binary treesplitting, the ternary tree splitting, and the split-to-squaresplitting. Splitting information on PUs or TUs may be signaled on a perPU basis or a per TU basis.

For example, when a PU is split, a first flag indicating whether a PU isfurther split by the quadtree splitting structure or whether no furthersplitting is performed is signaled. When a TU is split, a first flagindicating whether a TU is split by the quadtree structure or whether nofurther splitting is performed is signaled.

FIG. 20 is a diagram illustrating one example of the separated PU/TUtree splitting.

In the separated PU/TU tree splitting, one PU may include a plurality ofTUs or one TU may include a plurality of PUs. That is, the boundary ofone PU may include the boundaries of TUs, and the boundary of one TU mayinclude the boundaries of PUs.

In the separated PU/TU tree structure, since block splitting on a CU isnot performed, the leaf nodes of a PU are used as the optimal units onlyfor intra prediction, inter prediction, and motion compensation, and theleaf nodes of a TU are used as the optimal units only for transform,inverse transform, quantization, dequantization, and transformcoefficients encoding/decoding. That is, whether intra prediction orinter prediction is used is determined on a per PU basis.

For the separated PU/TU tree splitting, at least one of maximum/minimumsize information of a CTU, maximum/minimum size information of a PU,maximum depth information of a PU, maximum/minimum size information of aTU, and maximum depth information of a TU is entropy-encoded/decoded atthe level of at least one of a video parameter set (VPS), a sequenceparameter set (SPS), a picture parameter set (PPS), a tile header, aslice heater, a CTU, and CU. In addition, at least one of themaximum/minimum size information of a CTU, the maximum/minimum sizeinformation of a PU, the maximum depth information of a PU, themaximum/minimum size information of a TU, and the maximum depthinformation of a TU is a fixed value preset at the encoder side and thedecoder side, or a variable value derived from the coding parameters ofthe current block.

For example, a CTU has a 128×128 size, the maximum size of a PU may be128×128, and the maximum size of a TU may be 128×128. In addition, theminimum size of a PU and the minimum size of a TU may be 4×4. The depthof a PU may range from zero at which the size of the PU is equal to thesize of the CTU to a value corresponding to the minimum size of 4×4.Similarly, the depth of the TU may range from zero at which the size ofthe TU is equal to the size of the CTU to a value corresponding to theminimum size of 4×4.

For the PU splitting and the TU splitting in the separated PU/TU treesplitting, the above-described CU splitting method can be used.

Splitting structure information indicating which splitting structureneeds to be used is signaled. The splitting structure informationindicates at least one of the quadtree plus binary tree splitting, thecombined quadtree and binary tree splitting, the quadtree plusbinary/ternary tree splitting, the split-to-square splitting, and theseparated PU/TU tree splitting. Here, the splitting structureinformation may be signaled at a level of at least one of a videoparameter set (VPS), a sequence parameter set (SPS), a picture parameterset (PPS), a tile header, a slice header, and a CTU.

Among the embodiments described below, at least one method or anycombination of two or more methods can be used in at least one of theabove-described splitting structures including the quadtree plus binarytree splitting, the combined quadtree and binary tree splitting, thequadtree plus binary/ternary tree splitting, the split-to-squaresplitting, and the separated PU/TU tree splitting.

That is, the block splitting structure in the following descriptionrefers to at least one of the quadtree plus binary tree splitting, thecombined quadtree and binary tree splitting, the quadtree plusbinary/ternary tree splitting, the split-to-square splitting, and theseparated PU/TU tree splitting.

The block splitting structures according to the embodiments of thepresent invention are valid for PU or TU splitting as well as for CUsplitting.

For PUs that serve as the basic units of intra prediction, interprediction, and motion compensation, the PUs can be recursively splitusing at least one of the block splitting structures described above. Inthis case, for each PU, at least one parameter of the coding parametersof the nearest neighboring PU among multiple neighboring PUs can be usedfor at least one of intra prediction, inter prediction, and motioncompensation.

Each TU serving as the basic unit of transform, inverse transform,quantization, dequantization, and transform coefficientsencoding/decoding can be recursively split using at least one of theblock splitting structures described above. In this case, for each TU,at least one of the coding parameters of the nearest neighboring TUamong multiple neighboring TUs can be used for at least one of thetransform, inverse transform, quantization, dequantization, andtransform coefficients encoding/decoding.

In addition, when a TU is split by using the block splitting structuredescribed above to generate multiple blocks, an additional transform canbe performed on each block by using DC coefficients generated after aprimary transform is performed on each of the blocks. Similarly, anadditional inverse transform is performed by using DC coefficients ofeach block generated during a primary inverse transform and then aninverse transform is performed on each of the blocks. The nearest PU (orTU) is a PU (or TU) that shares the horizontal boundary or the verticalboundary with a current PU (or TU), or a PU abutting on the vertex ofthe current PU (or TU).

In the block splitting structure according to one embodiment of thepresent invention, motion information (for example, a motion vector, areference picture index, an inter prediction indicator, etc.) is storedon a per minimum-sized CU basis, and used for inter prediction or motioncompensation. For example, the minimum-sized CU is a block sizeindicated by the MinQTSize, MinBTSize, and MinCUSize.

In the block splitting structure according to one embodiment of thepresent invention, at least one piece of information that is necessaryat a unit level such as a TU, selected from among quantizationparameters, coding block flags, transform skip mode information,information indicating whether a primary transform is to be performed,information indicating whether a secondary transform is to be performed,a primary transform index, a secondary transform index, and informationindicating whether an overlapping transform is to be performed, may besignaled in units of a minimum block size or a larger size equal to orsmaller than a CTU, based on the tree structure. Here, the transformskip mode information may be included in the primary transform index tobe signaled.

The overlapping transform refers to a process of transforming theresidual block data of neighboring blocks of a current block as well asthe residual block data of the current block at the time of performing atransform to eliminate the discontinuity between blocks. Whether theoverlapping transform is to be performed may be determined depending onat least one of a block size and an intra prediction mode/direction. Theoverlapping transform can be performed by two types of one-dimensionaltransform according to separable transform properties.

In the block splitting structure according to one embodiment of thepresent invention, the scanning order or the encoding/decoding order ofat least one of CUs, PUs, and TUs is determined depending on a blocksize/shape.

In the block splitting structure according to one embodiment of thepresent, entropy-decoded splitting information can be used to split acurrent block according to at least one of the shape (square ornon-square) and the size of the current. In addition, when splitting acurrent block, only the reversed splitting with respect to the currentblock may be allowed. For example, a current block is first split alonga horizontal direction, an additional split of the current block can beperformed only along a vertical direction. Conversely, when a currentblock is first split along the vertical direction, an additional splitof the current block can be performed only along the horizontaldirection.

For example, in the block splitting structure according to oneembodiment of the present invention, when a current block is a binarytree node and the current block is to be further split by one deeperdepth, a split-to-nonsquare (non-square splitting) is not performed butonly a split-to-square (square splitting) is performed. This additionalsplitting may be signaled using a first flag (indicating asplit-to-square or no further split). In this case, since only splittinginformation indicating the split-to-square needs to be signaled, thenumber of bits for signaling the splitting information indicating thesplit-to-nonsquare can be saved.

Similarly, in the block splitting structure according to one embodimentof the present invention, when a current block is a binary tree node andthe current block is to be further split by one deeper depth, thesplit-to-square is not performed on the current block but only thesplit-to-nonsquare is performed. The additional splitting is signaledwith a first flag (indicating a split-to-nonsquare or no further split).In this case, since splitting information only on the split-to-nonsquareneeds to be signaled, the number of bits for signaling the splittinginformation indicating the split-to-square can be saved.

FIG. 21 illustrates an example of a CTU that is partitioned by the blocksplitting structure (i.e., the quadtree plus binary tree splitting) foreach of the quadtree depths and each of the binary tree depths. FIG. 21illustrates an example of a CTU in which a luma signal and a chromasignal are split by different types of the quadtree plus binary treesplitting structures. FIG. 22 illustrates an example of a CTU in which aCb chroma signal and a Cr chroma signal are split by different types ofthe quadtree plus binary tree splitting structures.

Here, the way that the splitting method in which the luma signal and thechroma signals within a CTU have different splitting structures is notlimitedly valid for the quadtree plus binary tree splitting structurebut is also valid for the combined quadtree and binary tree splittingstructure, the quadtree plus binary/ternary tree splitting structure,the split-to-square splitting structure, and the separated PU/TU treesplitting structure.

As in the example of FIG. 21 , the luma signal and the chroma signalswithin a CTU can be split by different block splitting structures. Forexample, the luma signal and the chroma signals within a CTU in aparticular slice (for example, I slice or intra slice) can be split bydifferent block splitting structures while the luma signal and thechroma signals within a CTU in each of the other slices (P and B slices)can have the same block splitting structure.

Referring to FIG. 21 , when a CTU has a 128×128 size, the CTU is splitinto four luma signal blocks having a 64×64 size and four chroma signalblocks having a 32×32 size, and different types of the quadtree orbinary tree splitting may be applied to the luma signal block and thechroma signal block, respectively.

When the luma signal and the chroma signal within in CTU are split bydifferent block splitting structures, a coded block flag (CBF)indicating whether at least one transform coefficient having a valueother than zero exists within the luma signal block may be signaled, anda CBF flag for the chroma signal block may also be signaled.

When the luma signal and the chroma signal within a CTU are splitrespectively by different block splitting structures, an intraprediction mode for the luma signal and an intra prediction mode for thechroma signal are separately signaled according to any one ofinformation indicating a luma signal or a chroma signal, a blocksplitting structure, a block size, and a block shape.

When the luma signal and the chroma signal within a CTU are splitrespectively by different block splitting structures, at least one or atleast two of an intra prediction mode of the corresponding luma signaland intra prediction modes of reconstructed neighboring chroma signalblocks are used together at the time of performing intra prediction onthe chroma signal. In this case, the intra prediction mode of theco-located luma signal may be derived by calculating the position of thecorresponding luma signal block on the basis of the position of thecurrent chroma signal block, by identifying the intra prediction mode ofthe luma signal located at the calculated position and the intraprediction modes of the neighboring luma signal blocks adjacent to thecalculated position, and by selecting at least one intra prediction modefrom among the identified intra prediction modes.

When the luma signal and the chroma signal within a CTU are splitrespectively by different block splitting structures, at least one offiltering methods including deblocking filtering, adaptive sample offsetfiltering, and adaptive in-loop filtering may be differently applied tothe luma signal and the chroma signal, according to at least one of adetermination on whether the signal is a luma signal or a chroma signal,a block splitting structure, a block size, and a block shape.

When the luma signal and the chroma signal within a CTU are splitrespectively by different block splitting structures, by inhibiting aninter-color component prediction in which a prediction block of thechroma signal is obtained on the basis of the reconstructed luma signal,information required to signal the inter-color component predictionmethod is reduced, thereby improving a coding efficiency.

As in the example of FIG. 22 , when a Cb chroma signal and a Cr chromasignal within a CTU can be split respectively by different blocksplitting structures.

Referring to FIG. 22 , when a CTU has a 128×128 size, the CTU is splitinto four luma signal blocks having a 64×64 size, four Cb chroma signalblocks having a 32×32 size, and four Cr chroma signal blocks having a32×32 size. Then, at least one of various types of quadtree and binarytree splitting structures may be applied to the luma signal blocks, theCb chroma signal blocks, and the Cr chroma signal blocks.

For example, in a particular slice (I slice), the Cb chroma signal andthe Cr chroma signal within a CTU can be split respectively by differentblock splitting structures. In addition, the Cb chroma signal and the Crchroma signal may be encoded/decoded with different intra predictionmodes, and the intra prediction modes of the Cb chroma signal and the Crchroma signal can be separately entropy-encoded/decoded. The intraprediction mode of the Cb chroma signal can be entropy-encoded/decodedby using the intra prediction mode of the Cr chroma signal. Conversely,the intra prediction mode of the Cr chroma signal can beentropy-encoded/decoded by using the intra prediction mode of the Cbchroma signal.

When the Cb signal and the Cr signal which are chroma signals within aCTU are split respectively by different block splitting structures, thecoded block flag (CBF) of the Cb signal block may be signaled, and thecoded block flag (CBF) of the Cr signal block may be signaled.

When the Cb signal and the Cr signal which are chroma signals within aCTU are split respectively by different block splitting structures, theintra prediction mode of the Cb signal and the intra prediction mode ofthe Cr signal are separately signaled according to at least one of adetermination of whether the signal is a Cb signal or a Cr signal, ablock partition structure, a block size, and a block shape.

When the Cb signal and the Cr signal which are chroma signals within aCTU are split respectively by different block splitting structures, whenperforming intra prediction on the Cb/Cr signal, at least one or atleast two of the intra prediction mode of the co-located Cb/Cr signalblock and the intra prediction modes of the reconstructed neighboringCb/Cr signal blocks may be used.

When the Cb signal and the Cr signal which are chroma signals within aCTU are split respectively by different block splitting structures, atleast one of the deblocking filtering, the adaptive sample offset, andthe adaptive in-loop filtering is differently performed on the Cb signaland the Cr signal, depending on at least one of information indicatingthe Cb signal or the Cr signal, a block split structure, a block size,and a block shape.

When the Cb signal and the Cr signal which are chroma signals within oneCTU are split respectively by different splitting structures, byinhibiting an inter-color component residual signal prediction method inwhich prediction of a Cr/Cb residual signal is performed on the basis ofthe reconstructed Cb/Cr residual signal, information required to signalinformation on the inter-color component residual signal predictionmethod can be saved, and thus coding efficiency can be improved.

In the block splitting structure according to one embodiment of thepresent invention, no further split may be performed under conditions inwhich a block size is equal to or less than a particular block size anda block partition depth is equal to or less than a particular blockpartition depth.

Here, information of the particular block size or the particular blockpartition depth may be entropy-encoded/decoded at a level of at leastone of a video parameter set (VPS), a sequence parameter set (SPS), apicture parameter set (PPS), a tile header, a slice header, a CTU, and aCU.

In addition, the information of the particular block size or theparticular block partition depth may be entropy-encoded/decoded at eachlevel to have different parameter values.

In addition, the information of the particular block size or theparticular block partition depth may be entropy-encoded/decodedseparately for a luma signal and a chroma signal to have differentparameter values.

In addition, the information of the particular block size or theparticular block partition depth may be entropy-encoded/decodedseparately for a Cb chroma signal and a Cr chroma signal to havedifferent parameter values.

In addition, information on the particular block size or the particularblock depth may be determined on the basis of the comparison between thedepth or size of the current block and a predetermined threshold value.The predetermined threshold value refers to a reference depth or sizethat determines the block structure. The predetermined threshold valuemay be represented in the form of at least one of a minimum value and amaximum value. The predetermined threshold value may be a fixed valuepreset at the encoder side and the decoder side, a variable valuederived on the basis of the coding parameters of the current block, or avalue signaled as being included within a bitstream.

At this time, no further block splitting may be performed depending onthe information of the particular block size or the particular blockdepth. Therefore, at least one of a flag and an index indicating asplitting structure may not be signaled when a block size is equal to orless than the particular block size or when a block depth is equal to orless than the particular block depth.

For example, in the quadtree plus binary/ternary tree splittingstructure, when no further splitting is performed according to theparticular block size or the particular block depth, at least one of afirst flag, a second flag, a third flag, a fourth flag, and a firstindex may not be signaled: the first flag indicating whether thequadtree splitting needs to be performed; the second flag indicatingwhether the binary/ternary tree splitting needs to be performed; thethird flag indicating a horizontal split or a vertical split; the fourthflag indicating a binary tree splitting or a ternary tree splitting; andthe first index indicating the type of binary tree splitting.

For example, when a CU is split by the quadtree plus binary treesplitting structure, at least one of a first flag and a first index maynot be signaled: the first flag indicating whether the quadtreesplitting needs to be performed or no further splitting needs to beperformed; and the first index indicating a horizontal symmetric split,a vertical symmetric split, or no further splitting.

For example, when a CU is split by using the quadtree plus binary treesplitting structure, at least one of a first flag, a second flag, and athird flag may not be signaled: the first flag indicating whether thequadtree splitting needs to be performed or no further splitting needsto be performed; the second flag indicating whether the binary treesplitting needs to be performed or no further splitting needs to beperformed; and the third flag indicating a horizontal symmetric split ora vertical symmetric split.

For example, when a CU is split by a binary tree symmetric splittingwhich is one type of the quadtree plus binary tree splitting structure,a first index indicating a horizontal symmetric split, a verticalsymmetric split, or no further splitting may not be signaled.

For example, when a CU is split by using a binary tree asymmetricsplitting structure which is one type of the quadtree plus binary treesplitting structure, at least one of a first flag, a second flag, and athird flag (or a first index) may not be signaled: the first flagindicating a horizontal split or a vertical split; the second flagindicating a symmetric split or an asymmetric split; and the third flagor the first index indicating a particular asymmetric split type amongvarious asymmetric split types.

For example, when a CU is split by using the combined quadtree andbinary tree splitting structure, at least one of a first index, a firstflag, and a second index may not be signaled: the first index indicatinga quadtree splitting, a binary tree splitting, or no further splitting;the first flag indicating a horizontal split or a vertical split; andthe second index indicating splitting position information.

For example, when a PU is split by using the separated PU/TU treesplitting structure, a first flag indicating whether a quadtreesplitting or no further splitting needs to be performed may not besignaled.

For example, when a TU is split by using the separated PU/TU treesplitting structure, a first flag indicating whether a quadtreesplitting or no further splitting needs to be performed may not besignaled.

In the block splitting structure according to one embodiment of thepresent invention, transform coefficients (including a quantized level)may be encoded/decoded by using at least one of transform, inversetransform, quantization, and dequantization.

When performing transform or inverse transform, a portion of transformcoefficients corresponding to a high frequency component are eliminated,while leaving only transform coefficients corresponding to a lowfrequency component. The high frequency-component transform coefficientsare located within a lower right region of a transform coefficientblock, and the low frequency-component transform coefficients arelocated within an upper left region of the transform coefficient block.The process of eliminating the high frequency-component transformcoefficients may be performed when the coefficient block has a sizeequal to or larger than an M×N size. Here, M and N are positive integersand both of them may be, for example, 64.

For example, when there is a block having a M×N size and M is equal toor greater than 64, transform coefficients located within left 32columns are maintained. When N is equal to or greater than 64, onlytransform coefficients within upper 32 rows are maintained.

For example, when there is a block having an M×N size and M is equal toor greater than 32, only the transform coefficients within left 16columns are maintained. When N is equal to or greater than 64, only thetransform coefficients within upper 32 rows are maintained.

For example, when there is a block having a M×N size and M is equal toor greater than 64, only the transform coefficients within left 32columns are maintained. When N is equal to or greater than 16, only thetransform coefficients within upper 8 rows are maintained.

A portion of the high frequency-component transform coefficients mayundergo quantization or dequantization with a bit depth equal to or lessthan the bit depth of an input signal, and a portion of the lowfrequency-component transform coefficients may undergo quantization ordequantization with a bit depth equal to or greater than the bit depthof the input signal. In this case, a process of performingquantization/dequantization with a low bit depth is performed on thehigh frequency-component transform coefficients when the horizontal sizeand the vertical size of a block are equal to or greater than M×N. Here,M and N are positive integers and both of them are, for example, 64.

For example, when there is a block having a 64×64 size, an upper leftregion having a 32×32 size is regarded as a low frequency componentregion, the transform coefficients located within the other regionundergo quantization or dequantization with a lower bit depth than thatof the input signal, and the transform coefficients located within theupper left region having a 32×32 size undergo quantization ordequantization with the same bit depth as the input signal.

A portion of the high frequency-component transform coefficients mayundergo quantization or dequantization with a quantization parametergreater than that of the quantization parameter of the current block,and a portion of the low frequency-component transform coefficients mayundergo quantization or dequantization with a quantization parameterequal to or less than the quantization parameter of the current block.In this case, the process of performing the quantization ordequantization with a quantization parameter greater than that of thecurrent block on the high frequency-component transform coefficients maybe performed when the horizontal size and the vertical size are equal toor greater than M×N wherein M and N are positive integers and both ofthem may be, for example, 64.

For example, when there is a block having a 64×64 size, an upper leftregion having a 32×32 size is regarded as a low frequency componentregion. Quantization or dequantization is performed on the transformcoefficients located within the remaining region by using a quantizationparameter which is the sum of a value of P and the quantizationparameter of the current block, in which P is a positive integer. On theother hand, quantization or dequantization is performed on the transformcoefficients located within the upper left region having the 32×32 sizeby using the quantization parameter of the current block.

A portion of a residual signal is divided into a most significant bit(MSB) and a least significant bit (LSB) along a bit plane. Next, atleast one of various processes including a primary transform, asecondary transform, quantization, a primary inverse transform, asecondary inverse transform, dequantization, andentropy-encoding/decoding is performed for each of the MSB and the LSB.

For example, when the residual signal consists of 11 bits, upper sixbits are classified as the MSBs and lower five bits are classified asthe LSBs. This process is performed when the horizontal size and thevertical size of a block is equal to or greater than M×N in which M andN are positive integers and both of them are, for example, 64.

A portion of the transform coefficients are divided into MSBs and LSBsalong a bit plane. Next, quantization or dequantization may be performedon the MSBs and LSBs using different quantization parameters,respectively. The quantization or dequantization may be performed on theMSBs by using a quantization parameter equal to or less than thequantization parameter of the current block, and the quantization ordequantization may be performed on the LSBs by using a quantizationparameter greater than the quantization parameter of the current block.

For example, when an input signal for the quantization or thedequantization consists of 10 bits, upper five bits are classified asMSBs and lower five bits are classified as LSBs. In this case, theprocess described above is performed when the horizontal size and thevertical size of the block are equal to or greater than M×N, in which Mand N are positive integers and both of them are, for example, 64.

In the block splitting structure according to one embodiment of thepresent invention, a CU may have a non-square shape, and a quantizationmatrix used in the quantization and dequantization processes may have anon-square shape.

At the encoder side, the quantization coefficients in a coefficientmatrix are scanned to transform a two-dimensional array of quantizationcoefficients into a one-dimensional array of quantization coefficients.At the decoder side, the quantization coefficients in a matrix arescanned to transform a reconstructed one-dimensional array ofquantization coefficients into a non-square two-dimensional array ofquantization coefficients. The quantization coefficients arranged in atwo dimensional quantization matrix may be a default quantization matrixdefined at the encoder side and the decoder side.

FIGS. 23A, 23B, 23C, 23D, 23E, and 23F) illustrates exemplary methods ofscanning a reconstructed quantization coefficients matrix.

For example, as illustrated in FIG. 23A, a diagonal scan is used totransform a one-dimensional matrix of reconstructed quantizationcoefficients into a two-dimensional matrix of quantization coefficients.In this case, the scanning is performed in a diagonally upward directionfrom the lower left corner to the upper right corner direction. When thescanning is performed toward the upper right corner from the lower leftcorner, this scan is called an up-right scan. When the scanning isperformed toward the lower left corner from the upper right corner, thisscan is called a down-left scan. FIG. 23A illustrates an example of thediagonal up-right scan.

For another example, as illustrated in FIG. 23B, a vertical scan is usedto transform a reconstructed one-dimensional quantization coefficientsmatrix into a two-dimensional quantization coefficients matrix. Thisvertical scan is a method of preferentially scanning the coefficients inthe first column.

For a further example, as illustrated in FIG. 23C, a horizontal scan isperformed to transform a reconstructed one-dimensional quantizationcoefficients matrix into a two-dimensional quantization coefficientsmatrix. The horizontal scan is a method of preferentially scanning thecoefficients in the first row first.

For a further example, as illustrated in FIG. 23D, a block-baseddiagonal scan is used to transform a reconstructed one-dimensionalquantization coefficients matrix into a two-dimensional quantizationcoefficients matrix. In this case, the block size may be 4×4, and thescanning is performed from the lower left corner to the upper rightcorner as illustrated in FIG. 23D or from the upper right corner to thelower left corner. FIG. 23D illustrates an example of the up-right scanof the block-based diagonal scans for a block having a 8×4 size.

For a further example, as illustrated in FIG. 23E, a block-basedvertical scan is performed for a 8×4 block to transform a reconstructedone-dimensional quantization coefficients matrix into a two-dimensionalquantization coefficients matrix. In this case, the block size may be4×4, and the blocks located on the first column are scanned first.

For a further example, as illustrated in FIG. 23F, a block-basedhorizontal scan is performed for a 4×8 block to transform areconstructed one-dimensional quantization coefficients matrix into atwo-dimensional quantization coefficients matrix. In this case, theblock size may be 4×4, and the blocks located on the first row arescanned first.

That is, when a quantization matrix used for a non-square block has anon-square form as in the examples described above, when thequantization matrix is scanned, the scanning is performed in anon-square form. Alternatively, the non-square quantization matrix issplit into M×M square blocks first, the square blocks are sequentiallyscanned one after another, and a specific square block can also bescanned, in which M is a positive integer.

The quantization coefficients in a reconstructed two-dimensionalquantization matrix can be can be reconstructed into a non-squaretwo-dimensional quantization matrix through the dequantization. In thiscase, the two-dimensional quantization matrix can be reconstructed byusing up-sampling, interpolation, DC matrix coefficients substitution,or sub-sampling. Examples of reconstruction of a quantization matrixwill be described below.

For example, in the case of a quantization matrix used for transformcoefficient blocks having a 16×4 size, a 16×16 reconstructedquantization matrix is sub-sampled with respect to y positions (a row,or a vertical direction) to reconstruct a 16×4 quantization matrix.

For another example, in the case of a quantization matrix used fortransform coefficient blocks having a 4×16 size, a reconstructedquantization matrix having a 16×16 size is sub-sampled with respect to xpositions (a column or a horizontal direction) to reconstruct a 4×16quantization matrix.

For a further example, in the case of a quantization matrix used fortransform coefficient blocks having a 32×8 size, a reconstructedquantization matrix having a 32×32 size are sub-sampled with respect toy positions (a row or a vertical direction) to reconstruct a 32×8quantization matrix.

For a further example, in the case of a quantization matrix used fortransform coefficient blocks having a 8×32 size, a reconstructedquantization matrix having a 32×32 size is sub-sampled with respect to xpositions (a column or a horizontal direction) to reconstruct a 8×32quantization matrix.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks may be used as a coding parameter of acurrent block.

For example, at least one of unit partition information of thereconstructed neighboring blocks, partition information indicating aquadtree splitting is performed, partition information indicatingwhether a binary tree splitting is performed, a split direction of abinary tree form, a split type (symmetric or asymmetric) of a binarytree form is used as at least one of unit partition information,quadtree partition information, binary tree partition information,binary tree split direction, and binary tree split type of the currentblock.

For example, at least one of a first flag indicating whether areconstructed neighboring block is split by quadtree splitting, a secondflag indicating whether a binary tree/ternary tree splitting isperformed, a third flag indicating a horizontal split or a verticalsplit, and a fourth flag indicating either a binary tree splitting or aternary tree splitting is used as at least one of a first flagindicating whether the current block is split by quadtree splitting, asecond flag indicating whether the current block is split by a binarytree/ternary tree splitting, a third flag indicating either the verticalsplit or the horizontal split, and a fourth flag indicating either thebinary tree splitting or the ternary tree splitting.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks is used to derive at least one of thecoding parameters of the current block.

For example, at least one of unit partition information of reconstructedneighboring blocks, quadtree partition information indicating whether areconstructed neighboring block is split by quadtree splitting, binarytree partition information indicating whether a reconstructedneighboring block is split by binary tree splitting, a split directionof a binary tree splitting, and a split type of a binary tree splitting,is used to derive at least one piece of information on the currentblock, including the unit partition information of the current block,information indicating whether the current block is split by quadtreesplitting, information indicating whether the current block is split bybinary tree splitting, a split direction of the binary tree splitting,and a split type of the binary tree splitting. In this case, at leastone of the coding parameters of the reconstructed neighboring blocks isused to derive at least one of the coding parameters of the currentblock. This means that at least one of the coding parameters of thecurrent block is determined by at least one of the coding parameters ofthe reconstructed neighboring blocks.

For example, at least one of a first flag indicating whether thereconstructed neighboring block is split by quadtree splitting, a secondflag indicating whether the reconstructed neighboring block is split bybinary tree/ternary tree splitting, a third flag indicating either avertical split or a horizontal split, and a fourth flag indicatingeither the binary tree splitting or the ternary tree splitting can beused to derive at least one of a first flag indicating whether thecurrent block is split by quadtree splitting, a second flag indicatingwhether the current block is split by binary tree/ternary treesplitting, a third flag indicating a vertical split or a horizontalsplit, and a fourth flag indicating at least one of the binary treesplitting and the ternary tree splitting.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks may be used for intra prediction of thecurrent block.

For example, at least one of intra prediction modes, intra predictiondirections, reference sample filtering methods, prediction blockfiltering methods, prediction block filter taps, and prediction blockfilter coefficients of reconstructed neighboring blocks is used in aprediction process of a current block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks can be used for inter prediction ormotion compensation of the current block.

For example, at least one of inter prediction modes, motion information,motion vectors, reference picture indexes, inter prediction directions,inter prediction indicators, reference picture lists, motion vectorpredictors, motion vector candidate lists, merge mode utilizationinformation on whether a merge mode is used or not, candidate lists,merge candidates, merge candidate lists, skip mode utilizationinformation on whether a skip mode is used or not, interpolation filtertypes, interpolation filter taps, motion vector sizes, motion vectorrepresentation accuracy of reconstructed neighboring blocks may be usedin an inter prediction process or a motion compensation process of thecurrent block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks may be used for the transform, inversetransform, quantization, or dequantization of the current block. Here,the transform includes at least one of a primary transform and asecondary transform and the inverse transform includes at least one of aprimary inverse transform and a secondary inverse transform.

For example, at least one of transform types, transform sizes,information on whether primary transform is used or not, information onwhether secondary transform is used or not, primary transform indexes,secondary transform indexes, information indicating presence or absenceof residual signals, coding block patterns, coding block flags,quantization parameters, and quantization matrices of reconstructedneighboring blocks may be used in a process of transforming,inverse-transforming, quantizing, or dequantizing the current block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks may be used in a process ofentropy-encoding/decoding the current block.

For example, at least one of unit partition information, information onwhether quadtree splitting is performed, information on whether binarytree splitting is performed, split directions of binary tree splitting,split types of binary tree splitting of the reconstructed neighboringblocks may be used in a process of entropy-encoding/decoding the currentblock. Here, the entropy-encoding/decoding may include various processessuch as binarization/de-binarization method decision, context modeldecision, context model updating, regular mode execution, and bypassmode execution.

For example, at least one of a first flag indicating whether areconstructed neighboring block is split by quadtree splitting, a secondflag indicating whether a reconstructed neighboring block is split bybinary tree/ternary tree splitting, a third flag indicating a verticalsplit or a horizontal split, and a fourth flag indicating at least oneof binary tree splitting and ternary tree splitting may be used forentropy-encoding/decoding the current block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters ofreconstructed neighboring blocks may be used for filtering methodsincluding intra in-loop filtering, deblocking filtering, adaptive sampleoffset, and adaptive in-loop filtering of the current block.

For example, information on whether an intra loop filter is applied to areconstructed neighboring block, intra loop filter coefficients, intraloop filter taps, intra loop filter shapes, intra loop filter types,information on a deblocking filter is applied, deblocking filtercoefficients, deblocking filter taps, deblocking filter intensities,deblocking filter shapes, deblocking filter types, information onwhether adaptive sample offset is applied, adaptive sample offsetvalues, adaptive sample offset categories, information indicatingwhether or not an adaptive in-loop filter is applied, adaptive in-loopfilter coefficients, adaptive in-loop filter taps, adaptive in-loopfilter shapes, adaptive in-loop filter types of reconstructedneighboring blocks may be used in a process of applying at least one ofthe filters such as a deblocking filter, an adaptive sample offsetfilter, and an adaptive in-loop filter to the current block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a lumasignal block may be used as at least one of the coding parameters of achroma signal block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a lumasignal block may be used to derive at least one of the coding parametersof a chroma signal block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a lumasignal block may be used for at least one of intra prediction, interprediction, motion compensation, transform, inverse transform,quantization, dequantization, entropy-encoding/decoding, intra loopfiltering, deblocking filtering, adaptive sample offset, adaptivein-loop filtering of a chroma signal block

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a Cb (or Cr)signal block may be used as at least one of the coding parameters of aCr (or Cb) signal block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a Cb (or Cr)signal block may be used to derive at least one of the coding parametersof a Cr (or Cb) signal block.

In the block splitting structure according to one embodiment of thepresent invention, at least one of the coding parameters of a Cb (or Cr)signal block may be used in at least one of intra prediction, interprediction, motion compensation, transform, inverse transform,quantization, dequantization, entropy-encoding/decoding, intra loopfiltering, deblocking filtering, adaptive sample offset, and adaptivein-loop filtering of a Cr (or Cb) signal block.

For each block generated by the block splitting structure according toone embodiment of the present invention, at least one piece ofinformation described below may be entropy-encoded/decoded. In addition,a method indicated by the entropy-encoded/decoded information describedbelow may be executed on the basis of at least one piece of informationamong the pieces of the entropy-encoded/decoded information describedbelow and at least one of a block size and a block shape.

-   -   Motion information may include at least one of a motion vector,        a reference picture index, an inter prediction indicator, skip        mode utilization information (skip_flag), merge mode utilization        information (merge_flag), merge index information (merge_index),        motion vector resolution information, overlapped block motion        compensation information, local illumination compensation        information, affine motion compensation information, decoder        motion vector derivation information, and bi-directional optical        flow information.    -   Motion vector resolution information may be information        indicating a specific resolution is used for at least one of a        motion vector and a motion vector difference value. The        resolution refers to precision. The specific resolution may be        at least one of an inter-pixel unit, a ½-pel unit, a ¼-pel unit,        a ⅛-pel unit, a 1/16-pel unit, a 1/32-pel unit, and a 1/64-pel        unit.    -   The overlapped block motion compensation information may be        information indicating whether a weighted sum of a prediction        block of a current block is calculated by using motion vectors        of spatially neighboring blocks adjacent to the current block        when performing motion compensation of the current block.    -   The location illumination compensation information may be        information indicating whether at least one of a weighting        factor and an offset value is used when generating a prediction        block of a current block. Here, the weighting factor and the        offset value are values calculated on the basis of a reference        block.    -   The affine motion compensation information may be information        indicating whether an affine motion model is used for motion        compensation of the current block. Here, the affine motion model        is a model of splitting one block into a plurality of sub-blocks        using a plurality of parameters, and calculating the motion        vectors of the respective sub-blocks using a representative        motion vector.    -   The decoder motion vector derivation information may be        information indicating whether a motion vector required for        motion compensation is derived and used in a decoder. Depending        on the decoder motion vector derivation information, information        on the motion vectors may not be entropy-encoded/decoded. When        the decoder motion vector derivation information indicates that        the motion vector is derived in the decoder and is then used,        information on a merge mode may be entropy-encoded/decoded. That        is, the decoder motion vector derivation information may        indicate whether a merge mode is used in the decoder.    -   The bi-directional optical flow information may be information        indicating whether motion compensation is performed by refining        a motion vector in units of a pixel or a sub-block. Depending on        the bi-directional optical flow information, the motion vectors        in units of a pixel or a sub-block may not be        entropy-encoded/decoded. Here, the motion vector refinement        refers to a process of changing the value of a block-based        motion vector in units of a pixel or a sub-block.

On the other hand, at least one of flags and indexes encoded in theencoder and decoded in the decoder may use at least one of binarizationmethods described below.

Truncated Rice Binarization Method

K-th order Exp_Golomb binarization method

Limited K-th order Exp_Golomb binarization method

Fixed-length binarization method

Unary Binarization Method

Truncated Unary Binarization Method

FIG. 24 is a flowchart illustrating am image decoding method accordingto one embodiment of the present invention.

Referring to FIG. 24 , a decoder splits a coding tree unit (CTU) into atleast one coding unit (CU) by using a block splitting structure (S2401).

The block splitting structure is configured such that at least one of abinary tree splitting and a ternary tree splitting is performed after aquadtree splitting is performed.

The binary tree includes a vertical binary tree and a horizontal binarytree, and the ternary tree includes a vertical ternary tree and ahorizontal ternary tree.

The block splitting structure is determined on the basis of at least oneof a first flag indicating whether a quadtree splitting is performed, asecond flag indicating whether a binary/ternary tree splitting isperformed, a third flag indicating a vertical split or a horizontalsplit, and a fourth flag indicating either the binary tree splitting orthe ternary tree splitting.

The block splitting structure is determined on the basis of at least oneof a quadtree root node size, a minimal allowed quadtree leaf node size,a maximal allowed binary tree root node size, a maximal allowed ternarytree root node size, a maximal allowed binary/ternary tree split depth,a minimal allowed binary tree leaf node size, and a minimal allowedternary tree leaf node size.

At least one of the quadtree root node size, the minimal allowedquadtree leaf node size, the maximal allowed binary tree root node size,the maximal allowed ternary tree root node size, the maximal allowedbinary/ternary tree split depth, the minimal allowed binary tree leafnode size, and the minimal allowed ternary tree lead node size isincluded in a sequence parameter set.

The block splitting structure is determined on the basis of a maximumtransform size.

When the CTU is included in an intra slice, the block partitioningstructures of a luma signal block and the corresponding chroma signalblocks within the CTU are independently determined.

The decoder performs decoding in units of a coding unit (CU) (S2402).

The decoder performs the decoding by performing at least either one orboth of intra prediction and inter prediction in units of a coding unit(CU). The decoder performs the decoding by performing at least one ofinverse transform or dequantization in units of a coding unit (CU).

FIG. 25 is a flowchart illustrating an image encoding method accordingto one embodiment of the present invention.

Referring to FIG. 25 , an encoder splits one coding tree unit (CTU) intoat least one coding unit (CU) in accordance with a block splittingstructure (S2501).

The block splitting structure is configured such that at least one of abinary tree splitting and a ternary tree splitting is performed after aquadtree splitting is performed.

The binary tree includes a vertical binary tree and a horizontal binarytree and the ternary tree includes a vertical ternary tree and ahorizontal ternary tree.

The block splitting structure is represented by using at least one of afirst flag indicating whether a, quadtree splitting is performed, asecond flag indicating whether a binary/ternary tree splitting isperformed, a third flag indicating a vertical split or a horizontalsplit, and a fourth flag indicating the binary tree splitting or theternary tree splitting.

The block splitting structure is restricted on the basis of at least oneof a quadtree root node size, a minimal allowed quadtree leaf node size,a maximal allowed binary tree root node size, a maximal allowed ternarytree root node size, a maximal allowed binary/ternary tree depth, aminimal allowed binary tree leaf node size, and a minimal allowedternary tree leaf node size.

At least one of the quadtree root node size, the minimal allowedquadtree leaf node size, the maximal allowed binary tree root node size,the maximal allowed ternary tree root node size, the maximal allowedbinary/ternary tree depth, the minimal allowed binary tree leaf nodesize, and the minimal allowed ternary tree leaf node size is included ina sequence parameter set to be encoded.

The block splitting structure is determined on the basis of a maximumtransform size.

When the CTU is included in an intra slice, the block splittingstructures of the luma signal and the corresponding chroma signalswithin the CTU are independently determined.

The encoder performs encoding in units of a coding unit (CU) (S2502).

The encoder performs encoding by performing at least either one or bothof intra prediction and inter prediction in units of a coding unit.

A recording medium according to one aspect of the present inventionstores a bitstream generated by execution of an image encoding methodincluding: splitting a coding tree unit into at least one coding unit inaccordance with a block splitting structure; and performing encoding inunits of the coding unit, in which the block splitting structure isconfigured such that at least one of a binary tree splitting and aternary tree splitting is performed after a quadtree splitting isperformed.

The above embodiments may be performed in the same method in an encoderand a decoder.

A sequence of applying to above embodiment may be different between anencoder and a decoder, or the sequence applying to above embodiment maybe the same in the encoder and the decoder.

The above embodiment may be performed on each luma signal and chromasignal, or the above embodiment may be identically performed on luma andchroma signals.

A block form to which the above embodiments of the present invention areapplied may have a square form or a non-square form.

The above embodiment of the present invention may be applied dependingon a size of at least one of a coding block, a prediction block, atransform block, a block, a current block, a coding unit, a predictionunit, a transform unit, a unit, and a current unit. Herein, the size maybe defined as a minimum size or maximum size or both so that the aboveembodiments are applied, or may be defined as a fixed size to which theabove embodiment is applied. In addition, in the above embodiments, afirst embodiment may be applied to a first size, and a second embodimentmay be applied to a second size. In other words, the above embodimentsmay be applied in combination depending on a size. In addition, theabove embodiments may be applied when a size is equal to or greater thata minimum size and equal to or smaller than a maximum size. In otherwords, the above embodiments may be applied when a block size isincluded within a certain range.

For example, the above embodiments may be applied when a size of currentblock is 8×8 or greater. For example, the above embodiments may beapplied when a size of current block is 4×4 or greater. For example, theabove embodiments may be applied when a size of current block is 16×16or greater. For example, the above embodiments may be applied when asize of current block is equal to or greater than 16×16 and equal to orsmaller than 64×64.

The above embodiments of the present invention may be applied dependingon a temporal layer. In order to identify a temporal layer to which theabove embodiments may be applied, additional identifier may be signaled,and the above embodiments may be applied to a specified temporal layeridentified by the corresponding identifier. Herein, the identifier maybe defined as the lowest layer or the highest layer or both to which theabove embodiment may be applied, or may be defined to indicate aspecific layer to which the embodiment is applied. In addition, a fixedtemporal layer to which the embodiment is applied may be defined.

For example, the above embodiments may be applied when a temporal layerof a current image is the lowest layer. For example, the aboveembodiments may be applied when a temporal layer identifier of a currentimage is 1. For example, the above embodiments may be applied when atemporal layer of a current image is the highest layer.

A slice type to which the above embodiments of the present invention areapplied may be defined, and the above embodiments may be applieddepending on the corresponding slice type.

In the above-described embodiments, the methods are described based onthe flowcharts with a series of steps or units, but the presentinvention is not limited to the order of the steps, and rather, somesteps may be performed simultaneously or in different order with othersteps. In addition, it should be appreciated by one of ordinary skill inthe art that the steps in the flowcharts do not exclude each other andthat other steps may be added to the flowcharts or some of the steps maybe deleted from the flowcharts without influencing the scope of thepresent invention.

The embodiments include various aspects of examples. All possiblecombinations for various aspects may not be described, but those skilledin the art will be able to recognize different combinations.Accordingly, the present invention may include all replacements,modifications, and changes within the scope of the claims.

The embodiments of the present invention may be implemented in a form ofprogram instructions, which are executable by various computercomponents, and recorded in a computer-readable recording medium. Thecomputer-readable recording medium may include stand-alone or acombination of program instructions, data files, data structures, etc.The program instructions recorded in the computer-readable recordingmedium may be specially designed and constructed for the presentinvention, or well-known to a person of ordinary skilled in computersoftware technology field. Examples of the computer-readable recordingmedium include magnetic recording media such as hard disks, floppydisks, and magnetic tapes; optical data storage media such as CD-ROMs orDVD-ROMs; magneto-optimum media such as floptical disks; and hardwaredevices, such as read-only memory (ROM), random-access memory (RAM),flash memory, etc., which are particularly structured to store andimplement the program instruction. Examples of the program instructionsinclude not only a mechanical language code formatted by a compiler butalso a high level language code that may be implemented by a computerusing an interpreter. The hardware devices may be configured to beoperated by one or more software modules or vice versa to conduct theprocesses according to the present invention.

Although the present invention has been described in terms of specificitems such as detailed elements as well as the limited embodiments andthe drawings, they are only provided to help more general understandingof the invention, and the present invention is not limited to the aboveembodiments. It will be appreciated by those skilled in the art to whichthe present invention pertains that various modifications and changesmay be made from the above description.

Therefore, the spirit of the present invention shall not be limited tothe above-described embodiments, and the entire scope of the appendedclaims and their equivalents will fall within the scope and spirit ofthe invention.

INDUSTRIAL APPLICABILITY

The present invention may be used in encoding/decoding an image.

1. A method of decoding a video, the method comprising: decodingresidual coefficients of a current block; performing aninverse-quantization for the residual coefficients of the current block;and performing an inverse-transform for inverse-quantized residualcoefficients, resulting from the inverse-quantization, of the currentblock, wherein residual coefficients included in a remaining regionexcluding a top-left region of the current block have a value of
 0. 2.The method of claim 1, wherein a size of the top-left region isadaptively determined based on a size of the current block.
 3. Themethod of claim 1, wherein the inverse-quantization is performed bymultiplying a scaling factor to a residual coefficient, and wherein thescaling factor is determined differently in units of a region of apredetermined size.
 4. The method of claim 1, wherein theinverse-transform comprises an inverse-secondary transform and aninverse-primary transform.
 5. The method of claim 1, wherein the currentblock is one of a plurality of blocks generated by splitting a parentnode coding block, and wherein when the parent node coding block crossesboth a lower boundary and a right boundary of a picture, the parent nodecoding block is implicitly split by quad-tree partitioning.
 6. A methodof encoding a video, the method comprising: obtaining residual samplesof a current block; performing a transform for the residual samples ofthe current block; performing a quantization for transformedcoefficients, resulting from the transform, of the current block; andencoding residual coefficients, resulting from the quantization, into abitstream, wherein residual coefficients included in a remaining regionexcluding a top-left region of the current block are set to
 0. 7. Amethod of encoding a video, the method comprising: obtaining residualsamples of a current block; performing a transform for the residualsamples of the current block; performing a quantization for transformedcoefficients, resulting from the transform, of the current block; andencoding residual coefficients, resulting from the quantization, into abitstream, wherein residual coefficients included in a remaining regionexcluding a top-left region of the current block are set to
 0. 8. Anon-transitory computer-readable storage medium storing compressed videodata generated by an encoding method, wherein the encoding methodcomprises: obtaining residual samples of a current block; performing atransform for the residual samples of the current block; performing aquantization for transformed coefficients, resulting from the transform,of the current block; and encoding residual coefficients, resulting fromthe quantization, into a bitstream, wherein residual coefficientsincluded in a remaining region excluding a top-left region of thecurrent block are set to 0.